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')) ?> - = $form->field($model, 'categories')->widget(Select2::className(), [ + = $form->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 - -
+ |
+ Статьи
+ |
+
+ + |
---|---|---|
+ | + | + |
+ |
+
+
+
+
+
+
+
+
+
+ Линия света представила трендовые модели на Interior Mebel
+
+
+
+
+
+
+
+
+
+ В Киеве прошла выставка Interior Mebel, которая уже традиционно собирает лучшие образцы дизайна интерьера. На... + + подробнее + +
+
+
+
+
+ Светодиодное освещение Light Topps | Светодиодные...
+
+
+
+
+
+
+
+ О светодиодных лампах и светильниках, в которых используются светодиодные модули, написано немало и наверняка уже...
+
+ подробнее
+
+
+
+
+
+
+
+
+ Люстры потолочные. Новые возможности управления светом
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Люстры потолочные оснащенные пультом дистанционного управления, позволяют включать/выключать, а также регулировать...
+
+ подробнее
+
+
+
+ |
+ + |
+ | + | + |