Commit 5d65011e7c3b3c39dc5250be11642e398d5aebff
1 parent
c0eaf9d7
big commti
Showing
3 changed files
with
29 additions
and
2 deletions
Show diff stats
console/migrations/m161020_145858_product_variant_add_status.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +use yii\db\Migration; | |
| 4 | + | |
| 5 | +class m161020_145858_product_variant_add_status extends Migration | |
| 6 | +{ | |
| 7 | + public function up() | |
| 8 | + { | |
| 9 | + $this->addColumn('product_variant', 'status', $this->integer(5)); | |
| 10 | + } | |
| 11 | + | |
| 12 | + public function down() | |
| 13 | + { | |
| 14 | + $this->dropColumn('product_variant', 'status'); | |
| 15 | + } | |
| 16 | + | |
| 17 | + /* | |
| 18 | + // Use safeUp/safeDown to run migration code within a transaction | |
| 19 | + public function safeUp() | |
| 20 | + { | |
| 21 | + } | |
| 22 | + | |
| 23 | + public function safeDown() | |
| 24 | + { | |
| 25 | + } | |
| 26 | + */ | |
| 27 | +} | ... | ... |
frontend/views/catalog/product.php
| ... | ... | @@ -455,7 +455,7 @@ FlipclockAsset::register($this); |
| 455 | 455 | </tr> |
| 456 | 456 | <tr class="full short"> |
| 457 | 457 | <td class="name">Бренд</td> |
| 458 | - <td class="value"><?= isset($product->brand) ? $product->brand->name : $product->brand->name ?></td> | |
| 458 | + <td class="value"><?= !empty($product->brand) ? $product->brand->name : '' ?></td> | |
| 459 | 459 | </tr> |
| 460 | 460 | <?php foreach($product->getActiveProperties($category->category_id) as $group): ?> |
| 461 | 461 | <tr class="full short gray"> | ... | ... |
frontend/views/catalog/products.php
| ... | ... | @@ -10,7 +10,7 @@ use yii\helpers\Url; |
| 10 | 10 | use yii\widgets\ListView; |
| 11 | 11 | |
| 12 | 12 | |
| 13 | - $this->params['seo']['title'] = !empty($category->meta_title) ? $category->meta_title : ''; | |
| 13 | + $this->params['seo']['title'] = !empty($category->meta_title) ? $category->meta_title : $category->name; | |
| 14 | 14 | |
| 15 | 15 | $this->params['seo']['fields']['meta-title'] = $category->meta_title; |
| 16 | 16 | $this->params['seo']['h1'] = !empty($category->h1) ? $category->h1 : $category->name; | ... | ... |