diff --git a/backend/views/category/_form.php b/backend/views/category/_form.php index e41c52e..68cf4c8 100755 --- a/backend/views/category/_form.php +++ b/backend/views/category/_form.php @@ -30,7 +30,7 @@ use kartik\select2\Select2; ] ])->label(Yii::t('product', 'Parent category')) ?> - field($model, 'categories')->widget(Select2::className(), [ + field($model, 'taxGroup')->widget(Select2::className(), [ 'data' => \yii\helpers\ArrayHelper::map(\common\modules\rubrication\models\TaxGroup::find()->all(), 'tax_group_id', 'name'), 'language' => 'ru', 'options' => [ diff --git a/common/models/Customer.php b/common/models/Customer.php index 8103ac0..863ab06 100755 --- a/common/models/Customer.php +++ b/common/models/Customer.php @@ -7,7 +7,7 @@ use yii\base\NotSupportedException; use yii\behaviors\TimestampBehavior; use yii\db\ActiveRecord; -class Customer extends \yii\db\ActiveRecord implements \yii\web\IdentityInterface +class Customer extends User implements \yii\web\IdentityInterface { public $password_repeat; public $role; diff --git a/common/modules/product/models/Category.php b/common/modules/product/models/Category.php index fef7ce4..025a456 100755 --- a/common/modules/product/models/Category.php +++ b/common/modules/product/models/Category.php @@ -39,7 +39,6 @@ use common\behaviors\Slug; class Category extends \yii\db\ActiveRecord { public $imageUpload; - public $categories; public function behaviors() { @@ -80,7 +79,7 @@ class Category extends \yii\db\ActiveRecord [['meta_robots'], 'string', 'max' => 50], [['alias', 'name'], 'string', 'max' => 250], [['populary'], 'boolean'], - [['imageUpload','categories'], 'safe'], + [['imageUpload','taxGroup'], 'safe'], [['imageUpload'], 'file', 'extensions' => 'jpg, gif, png'], ]; } @@ -268,6 +267,12 @@ class Category extends \yii\db\ActiveRecord } + + public function setTaxGroup($value) + { + return $this->tax_group = $value; + } + public function getTaxGroup() { return $this->hasMany(TaxGroup::className(), ['tax_group_id' => 'tax_group_id']) diff --git a/common/modules/product/models/Export.php b/common/modules/product/models/Export.php index 8ed13b4..032e8df 100755 --- a/common/modules/product/models/Export.php +++ b/common/modules/product/models/Export.php @@ -18,7 +18,7 @@ class Export extends Model { $handle = fopen($dirName .'/'. $filename, "w"); ///$products = Product::find()->joinWith(['variants'])->where(['!=', ProductVariant::tableName() .'.stock', 0])->select('product.product_id')->all(); $products = Product::find() - ->with(['variantsWithFilters','brand','categoriesWithName'])->all(); + ->with(['variantsWithFilters','brand','categories'])->all(); $i = 0; foreach ($products as $product) @@ -55,9 +55,9 @@ class Export extends Model { // $filters = $product->properties; $categories = []; - foreach($product->categoriesWithName as $value){ - $categorName = ArrayHelper::getColumn($value->categoryNames,'value'); - $categories[] = $categorName[0]; + foreach($product->categories as $value){ + + $categories[] = $value->name; } @@ -65,6 +65,7 @@ class Export extends Model { $categories = implode(',',$categories); $list = [ + $categories, $product->brand->name, $product->name, @@ -75,8 +76,8 @@ class Export extends Model { (!empty($product->variant)) ? $product->variant->price : '', intval($product->akciya), '', - intval($product->new), - intval($product->top), + intval($product->is_new), + intval($product->is_top), $product->video, implode (',', $fotos), ]; diff --git a/common/modules/product/models/Import.php b/common/modules/product/models/Import.php index a167acd..9f256cf 100755 --- a/common/modules/product/models/Import.php +++ b/common/modules/product/models/Import.php @@ -265,7 +265,7 @@ class Import extends Model { // 5 Описание Рус $product_body_ru = $data[4]; - // 6 Фильтр (['pol'='мужской']*['god' = '2013']*['volume'='25 л']*['size'='49 x 30 x 20см']*['composition'='600D полиэстер']) + // 6 Фильтр $filters = explode ('*', $data[5]); // 11 Цена акция diff --git a/common/modules/rubrication/models/TaxOption.php b/common/modules/rubrication/models/TaxOption.php index 7a05c44..78ae597 100755 --- a/common/modules/rubrication/models/TaxOption.php +++ b/common/modules/rubrication/models/TaxOption.php @@ -19,6 +19,7 @@ use yii\db\ActiveRecord; * @property string $alias * @property integer $sort * @property integer $default_value + * @property integer $name * * @property TaxEntityRelation[] $taxEntityRelations * @property TaxGroup $taxGroup @@ -160,52 +161,26 @@ class TaxOption extends \yii\db\ActiveRecord return $this->hasOne(TaxValueString::className(), ['tax_option_id' => 'tax_option_id']); } - public function getName(){ - return (!empty($this->taxValueString)) ? $this->taxValueString->value : '' ; - } - - - - public function setName($values){ - $this->name = $values; - } /** */ public function getValue() { - $valueClass = $this->getValueModelName(); - if ($valueClass) { - return $this->hasOne($valueClass, ['tax_value_id' => 'default_value', 'tax_option_id' => 'tax_option_id'])->inverseOf('taxOption'); - } + return $this->name; } /** */ public function getValueRenderFlash() { - $valueClass = $this->getValueModelName(); - $value = $this->value; - if ($valueClass && method_exists($valueClass, 'getValueRenderFlash')) { - return $valueClass::getValueRenderFlash($value); - } elseif(!empty($value)) { - return $value->value; - } else { - return null; - } + return $this->name; } /** */ public function getValueRenderHTML() { - $valueClass = $this->getValueModelName(); - $value = $this->value; - if ($valueClass && method_exists($valueClass, 'getValueRenderHTML')) { - return $valueClass::getValueRenderHTML($value); - } else { - return $value->value; - } + return $this->name; } /** diff --git a/frontend/assets/AppAsset.php b/frontend/assets/AppAsset.php index a02356f..8bd1329 100755 --- a/frontend/assets/AppAsset.php +++ b/frontend/assets/AppAsset.php @@ -19,6 +19,7 @@ class AppAsset extends AssetBundle public $baseUrl = '@web'; public $css = [ 'css/css_header.css', + 'css/comments.css', 'http://fonts.googleapis.com/css?family=Roboto:400,300,700&subset=latin,cyrillic-ext', ]; public $js = [ diff --git a/frontend/models/SignupForm.php b/frontend/models/SignupForm.php old mode 100755 new mode 100644 index 7c7d9c0..7115378 --- a/frontend/models/SignupForm.php +++ b/frontend/models/SignupForm.php @@ -1,7 +1,7 @@ username = $this->username; $user->surname = $this->surname; $user->email = $this->email; diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index fc82479..2ff122d 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -3,6 +3,7 @@ use common\components\artboximage\ArtboxImageHelper; use frontend\assets\FotoramaAsset; use frontend\widgets\Seo; +use common\modules\comment\widgets\CommentWidget; FotoramaAsset::register($this); $this->params[ 'seo' ][ 'key' ] = $category->name; $this->params[ 'seo' ][ 'fields' ][ 'name' ] = $product->fullname; @@ -514,76 +515,13 @@ $this->params[ 'breadcrumbs' ][] = $product->fullname . ' #' . $product->enabled - -
- - -
-
- - - - -
-
Добавьте свой отзыв
- - - - - - - - - -
Ваше имя: -
- -
Оцените этот товар: -
- - -
-
- -
-
Достоинства:
-
-
- -
-
-
- -
-
Недостатки:
-
-
-
-
- -
-
Комментарий:
-
-
-
-
- -
-
-
- -
- -
- -
-
-
- +
+ $product, + ]); + ?> +
diff --git a/frontend/views/order/success.php b/frontend/views/order/success.php index 0566a97..fbf7e29 100644 --- a/frontend/views/order/success.php +++ b/frontend/views/order/success.php @@ -1 +1,197 @@ -

Go home

\ No newline at end of file +
+ +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + Линия света представила трендовые модели на Interior Mebel + + + +
+

В Киеве прошла выставка Interior Mebel, которая уже традиционно собирает лучшие образцы дизайна интерьера. На... + + подробнее + +

+ +
+ + +
+ + + + + Светодиодное освещение Light Topps | Светодиодные... + + + +
+ О светодиодных лампах и светильниках, в которых используются светодиодные модули, написано немало и наверняка уже... + + подробнее + +
+ +
+ + +
+ + + + + Люстры потолочные. Новые возможности управления светом + + + +
+ Люстры потолочные оснащенные пультом дистанционного управления, позволяют включать/выключать, а также регулировать... + + подробнее + +
+ +
+ + + + + + + + + + +
+ + +
+ + +
+ +
+ + + +
+ + +
+
+ +
+ +
+
+ + + + + + +
+ + + + + + + + + +
+ Заказ успешно осуществлён! Во время обработки вашего заказа менеджер свяжется с Вами. +

+
+ Уникальный номер заказа: 1332 +
+

Спасибо за заказ!!

+ « На главную
+ + + + + + +
+ +
+ + +
+ + + + + + +
+
+ +
+
+
\ No newline at end of file diff --git a/frontend/web/css/comments.css b/frontend/web/css/comments.css new file mode 100755 index 0000000..7587ab6 --- /dev/null +++ b/frontend/web/css/comments.css @@ -0,0 +1 @@ +@import "https://fonts.googleapis.com/css?family=Roboto:400,700,500&subset=cyrillic-ext,latin,cyrillic,latin-ext";.input_bl,.area_bl,.form-comm-wr,.user_name,.user_txt,.comment-panel,.answer-form,.comments-start input,.comments-start textarea,.submit_btn button,.input_bl label{box-sizing:border-box}.comments-border{width:100%;margin-top:25px;margin-bottom:27px;height:1px;background:#d2d2d2}.comments-start{width:730px;margin:0 auto;font-family:'Roboto',sans-serif;font-weight:400;color:#333}.form-comm-wr{width:100%;background:#f5f5f5;padding:20px;float:left}.input_bl{margin-top:15px;float:left}.area_bl,.input_bl{position:relative}.input_bl input,.input_bl textarea,.answer-form textarea{width:258px;height:30px;border:1px solid #d2d2d2;background:#fff;outline:none!important;border-radius:4px;padding-left:10px}.area_bl textarea,.answer-form textarea{resize:none!important;height:140px;width:585px;padding-top:7px}.input_bl input:focus,.input_bl textarea:focus,.answer-form textarea:focus{box-shadow:1px 2px 2px 0 rgba(215,215,215,0.75) inset;transition:.1s}.input_bl label{font-size:12px;color:#7d7d7d;font-weight:400;text-transform:uppercase;position:relative;width:105px;float:left;text-align:right;padding-right:10px;margin-top:9px}.input_bl:nth-child(2) label{width:69px}.submit_btn{float:right;margin-top:27px}.submit_btn button,.answer-form button{padding:0 17px;height:32px;font-weight:500;font-size:15px;color:#fff;border-top:0;border-left:0;border-right:0;border-bottom:2px solid #799920;background:#95ba2f;border-radius:4px;cursor:pointer;outline:none!important}.submit_btn button:hover,.answer-form button:hover{border-bottom:2px solid #95ba2f}.submit_btn button:active,.answer-form button:active{border-bottom:2px solid #799920;background:#799920}.answer-form button{float:right;margin-top:27px}.comments-wr,.comment-answer{min-height:64px;position:relative;float:left;width:100%}.answer-form{float:left;width:100%}.user-ico{width:80px;height:80px;float:left;overflow:hidden;border-radius:50%;position:absolute;top:0;left:0}.user-ico img{width:100%;height:100%}.user_data{margin-top:-2px;font-size:12px;color:#636363}.user_name{margin-top:6px;font-weight:700;font-size:15px}.user_name,.user_txt,.comment-panel,.answer-form,.user_data{width:100%;float:left;padding-left:100px}.user_txt{margin-top:8px;font-size:13px;line-height:18px}.comment-panel{width:100%;float:left;margin-top:11px}.comment-panel a:first-child{margin-left:0}.btn-comm-answer,.btn-comm-delete{font-size:13px;color:#799920;border-bottom:1px dotted #799920}.btn-comm-answer,.btn-comm-delete,.btn-comm-like,.btn-comm-dislike{float:left;margin-left:10px;text-decoration:none}.btn-comm-answer,.btn-comm-delete{height:16px;line-height:16px}.btn-comm-answer:hover,.btn-comm-delete:hover{text-decoration:none;border-bottom:0}.btn-comm-like,.btn-comm-dislike{width:14px;height:16px;background-image:url(../images/like_dislike.png);background-repeat:no-repeat}.btn-comm-like{background-position:0 0}.btn-comm-like:hover{background-position:0 -16px}.btn-comm-dislike:hover{background-position:-14px -16px}.btn-comm-dislike{background-position:-14px 0}.btn-comm-like:active,.btn-comm-dislike:active{opacity:.7}.comment-answer{margin-top:40px}.comment-answer .user-ico{left:100px}.comment-answer .user_name,.comment-answer .user_txt,.comment-answer .comment-panel,.comment-answer .answer-form,.comment-answer .user_data{padding-left:200px}.comments-wr{margin-top:40px}.answer-form{margin-top:20px}.answer-form textarea{width:100%;height:90px}.input_bl.has-error input,.input_bl.has-error textarea,.answer-form .has-error textarea{box-shadow:1px 2px 2px 0 rgba(212,0,0,0.2) inset}.required label{color:#d40000}.input_bl .help-block,.answer-form .help-block{display:none}.required label:before{display:block;content:"*";color:#d40000;position:absolute;top:0;right:-7px}.comments-start ul.pagination{list-style:none;text-align:center;margin-top:40px;width:100%;float:left}.comments-start ul.pagination li{display:inline}.comments-start ul.pagination li.prev.disabled span{display:none}.comments-start ul.pagination li a{padding:3px;color:#82a02f;font-size:15px;margin:0;text-decoration:none}.comments-start ul.pagination li.active a{color:#333} \ No newline at end of file -- libgit2 0.21.4