Commit d010870586ba838ddc2cb9377613fb01cb0fa871
1 parent
429776d7
All seo
Showing
7 changed files
with
52 additions
and
35 deletions
Show diff stats
.htaccess
| @@ -14,7 +14,12 @@ AddDefaultCharset utf-8 | @@ -14,7 +14,12 @@ AddDefaultCharset utf-8 | ||
| 14 | # deal with admin first | 14 | # deal with admin first |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | - | 17 | + Redirect 301 /Kak_vibrat_ryuksak / |
| 18 | + Redirect 301 /products/ryukzaki /catalog/ryukzaki | ||
| 19 | + Redirect 301 /products/koshel_ki /catalog/koshelki | ||
| 20 | + Redirect 301 /products/nesessery /catalog/nesessery | ||
| 21 | + Redirect 301 /products/sumki /catalog/sumki | ||
| 22 | + Redirect 301 /products/germochehly /catalog/germocehly | ||
| 18 | 23 | ||
| 19 | RewriteRule ^storage/(.*)?$ /storage/$1 [L,PT] | 24 | RewriteRule ^storage/(.*)?$ /storage/$1 [L,PT] |
| 20 | 25 | ||
| @@ -85,7 +90,6 @@ AddDefaultCharset utf-8 | @@ -85,7 +90,6 @@ AddDefaultCharset utf-8 | ||
| 85 | 90 | ||
| 86 | 91 | ||
| 87 | 92 | ||
| 88 | - | ||
| 89 | # RewriteCond %{HTTP_HOST} ^([^www].*)$ | 93 | # RewriteCond %{HTTP_HOST} ^([^www].*)$ |
| 90 | # RewriteRule ^(.*)$ http://www.%1/$1 [R=301] | 94 | # RewriteRule ^(.*)$ http://www.%1/$1 [R=301] |
| 91 | 95 |
frontend/config/main.php
| @@ -111,6 +111,7 @@ return [ | @@ -111,6 +111,7 @@ return [ | ||
| 111 | 'admin/catalog/save' => 'admin/catalog/save', | 111 | 'admin/catalog/save' => 'admin/catalog/save', |
| 112 | 'admin/catalog/delete' => 'admin/catalog/delete', | 112 | 'admin/catalog/delete' => 'admin/catalog/delete', |
| 113 | 113 | ||
| 114 | + | ||
| 114 | 'thumbs/<path:.*>' => 'site/thumb', | 115 | 'thumbs/<path:.*>' => 'site/thumb', |
| 115 | ], | 116 | ], |
| 116 | 'class' => 'common\components\urlManager\LangUrlManager', | 117 | 'class' => 'common\components\urlManager\LangUrlManager', |
frontend/views/catalog/product.php
| @@ -113,7 +113,9 @@ $this->registerJs (" | @@ -113,7 +113,9 @@ $this->registerJs (" | ||
| 113 | data-image="<?= \common\components\artboximage\ArtboxImageHelper::getImageSrc($variant->imageUrl, 'product_view') ?>" | 113 | data-image="<?= \common\components\artboximage\ArtboxImageHelper::getImageSrc($variant->imageUrl, 'product_view') ?>" |
| 114 | data-imageoriginal="<?= $variant->imageUrl ?>" | 114 | data-imageoriginal="<?= $variant->imageUrl ?>" |
| 115 | title="<?= $product->fullname ?>"> | 115 | title="<?= $product->fullname ?>"> |
| 116 | - <?= \common\components\artboximage\ArtboxImageHelper::getImage($variant->imageUrl, 'product_variant')?> | 116 | + <?= \common\components\artboximage\ArtboxImageHelper::getImage($variant->imageUrl, 'product_variant', ['alt' => $product->category->categoryName->value . ' ' . |
| 117 | + $product->fullname, 'title' => $product->category->categoryName->value . ' ' . | ||
| 118 | + $product->fullname])?> | ||
| 117 | </a> | 119 | </a> |
| 118 | </li> | 120 | </li> |
| 119 | <?php endforeach; ?> | 121 | <?php endforeach; ?> |
| @@ -129,7 +131,7 @@ $this->registerJs (" | @@ -129,7 +131,7 @@ $this->registerJs (" | ||
| 129 | <span class="cost"><span id='cost'>0</span> <span class="valute">грн.</span></span> | 131 | <span class="cost"><span id='cost'>0</span> <span class="valute">грн.</span></span> |
| 130 | </div> | 132 | </div> |
| 131 | <input type='hidden' id='product_id'/> | 133 | <input type='hidden' id='product_id'/> |
| 132 | - <a href="#" rel='product' class="link_buy fl">В Корзину</a> | 134 | + <a href="#" rel='product' class="link_buy fl">Купить</a> |
| 133 | <div class="both"></div> | 135 | <div class="both"></div> |
| 134 | </div> | 136 | </div> |
| 135 | 137 | ||
| @@ -146,7 +148,8 @@ $this->registerJs (" | @@ -146,7 +148,8 @@ $this->registerJs (" | ||
| 146 | <?php endif?> | 148 | <?php endif?> |
| 147 | </ul> | 149 | </ul> |
| 148 | </div> | 150 | </div> |
| 149 | - | 151 | + <br> |
| 152 | + <div class="ya-share2" data-services="vkontakte,facebook,odnoklassniki,gplus,twitter" data-size="s"></div> | ||
| 150 | </div> | 153 | </div> |
| 151 | <?php /* | 154 | <?php /* |
| 152 | <div class="product_service"> | 155 | <div class="product_service"> |
| @@ -193,13 +196,17 @@ $this->registerJs (" | @@ -193,13 +196,17 @@ $this->registerJs (" | ||
| 193 | <div class="content"> | 196 | <div class="content"> |
| 194 | <div class="pic"> | 197 | <div class="pic"> |
| 195 | <center> | 198 | <center> |
| 196 | - <a href="#" rel="shadowbox[gal]" id="picoriginal"><?= \common\components\artboximage\ArtboxImageHelper::getImage($product->enabledVariants[0]->imageUrl, 'product_view',['id'=>'pic'])?></a> | 199 | + <a href="#" rel="shadowbox[gal]" id="picoriginal"><?= \common\components\artboximage\ArtboxImageHelper::getImage($product->enabledVariants[0]->imageUrl, 'product_view',['id'=>'pic', 'alt' => $product->category->categoryName->value . ' ' . |
| 200 | + $product->fullname, 'title' => $product->category->categoryName->value . ' ' . | ||
| 201 | + $product->fullname])?></a> | ||
| 197 | </center> | 202 | </center> |
| 198 | </div> | 203 | </div> |
| 199 | <ul class="product_colors"> | 204 | <ul class="product_colors"> |
| 200 | <?php foreach ($product->images as $image): ?> | 205 | <?php foreach ($product->images as $image): ?> |
| 201 | <li><a href="<?= $image->imageUrl ?>" rel="shadowbox[gal]"> | 206 | <li><a href="<?= $image->imageUrl ?>" rel="shadowbox[gal]"> |
| 202 | - <?= \common\components\artboximage\ArtboxImageHelper::getImage($image->imageUrl, 'product_trumb2')?> | 207 | + <?= \common\components\artboximage\ArtboxImageHelper::getImage($image->imageUrl, 'product_trumb2',['alt' => $product->category->categoryName->value . ' ' . |
| 208 | + $product->fullname, 'title' => $product->category->categoryName->value . ' ' . | ||
| 209 | + $product->fullname])?> | ||
| 203 | </a></li> | 210 | </a></li> |
| 204 | <?php endforeach; ?> | 211 | <?php endforeach; ?> |
| 205 | </ul> | 212 | </ul> |
frontend/views/catalog/product_item.php
| @@ -6,7 +6,9 @@ use yii\helpers\Url; | @@ -6,7 +6,9 @@ use yii\helpers\Url; | ||
| 6 | <div class="boxitem"> | 6 | <div class="boxitem"> |
| 7 | <div class="pixbox"> | 7 | <div class="pixbox"> |
| 8 | <a href="<?= Url::to(['catalog/product', 'product' => $product,'#' => 'm' .$product->enabledVariants[0]->product_variant_id]) ?>"> | 8 | <a href="<?= Url::to(['catalog/product', 'product' => $product,'#' => 'm' .$product->enabledVariants[0]->product_variant_id]) ?>"> |
| 9 | - <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->enabledVariants[0]->imageUrl, 'list')?> | 9 | + <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->enabledVariants[0]->imageUrl, 'list',['alt' => $product->category->categoryName->value . ' ' . |
| 10 | + $product->fullname, 'title' => $product->category->categoryName->value . ' ' . | ||
| 11 | + $product->fullname])?> | ||
| 10 | </a> | 12 | </a> |
| 11 | </div> | 13 | </div> |
| 12 | <?php if(!empty($product->is_top) || !empty($product->is_new) || !empty($product->akciya)) :?> | 14 | <?php if(!empty($product->is_top) || !empty($product->is_new) || !empty($product->akciya)) :?> |
| @@ -61,7 +63,9 @@ use yii\helpers\Url; | @@ -61,7 +63,9 @@ use yii\helpers\Url; | ||
| 61 | 'catalog/product', | 63 | 'catalog/product', |
| 62 | 'product' => $product, | 64 | 'product' => $product, |
| 63 | '#' => 'm' . $variant->product_variant_id]) ?>"> | 65 | '#' => 'm' . $variant->product_variant_id]) ?>"> |
| 64 | - <?= \common\components\artboximage\ArtboxImageHelper::getImage($variant->imageUrl, 'product_variant')?> | 66 | + <?= \common\components\artboximage\ArtboxImageHelper::getImage($variant->imageUrl, 'product_variant',['alt' => $product->category->categoryName->value . ' ' . |
| 67 | + $product->fullname, 'title' => $product->category->categoryName->value . ' ' . | ||
| 68 | + $product->fullname])?> | ||
| 65 | </a> | 69 | </a> |
| 66 | </li> | 70 | </li> |
| 67 | <?php endif; ?> | 71 | <?php endif; ?> |
frontend/views/layouts/main.php
| @@ -95,6 +95,7 @@ $this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['posi | @@ -95,6 +95,7 @@ $this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['posi | ||
| 95 | ga('create', 'UA-75674711-1', 'auto'); | 95 | ga('create', 'UA-75674711-1', 'auto'); |
| 96 | ga('send', 'pageview'); | 96 | ga('send', 'pageview'); |
| 97 | </script> | 97 | </script> |
| 98 | + <meta name="google-site-verification" content="niSpd01ftupUt3pFCfQkh2zoezuPuUGblNOSGs-iRWo" /> | ||
| 98 | </head> | 99 | </head> |
| 99 | <body> | 100 | <body> |
| 100 | <!-- Google Tag Manager --> | 101 | <!-- Google Tag Manager --> |
frontend/views/products/show.php
| @@ -115,7 +115,7 @@ use yii\widgets\Breadcrumbs; | @@ -115,7 +115,7 @@ use yii\widgets\Breadcrumbs; | ||
| 115 | <span class="cost"><span id='cost'>0</span> <span class="valute">грн.</span></span> | 115 | <span class="cost"><span id='cost'>0</span> <span class="valute">грн.</span></span> |
| 116 | </div> | 116 | </div> |
| 117 | <input type='hidden' id='product_id'/> | 117 | <input type='hidden' id='product_id'/> |
| 118 | - <a href="#" rel='product' class="link_buy fl">В Корзину</a> | 118 | + <a href="#" rel='product' class="link_buy fl">Купить</a> |
| 119 | <div class="both"></div> | 119 | <div class="both"></div> |
| 120 | </div> | 120 | </div> |
| 121 | 121 |
frontend/widgets/Seo.php
| @@ -83,45 +83,45 @@ class Seo extends Widget | @@ -83,45 +83,45 @@ class Seo extends Widget | ||
| 83 | 83 | ||
| 84 | if (!empty($title)) { | 84 | if (!empty($title)) { |
| 85 | return $title; | 85 | return $title; |
| 86 | - } | 86 | + } else if(!empty($filter)) { |
| 87 | 87 | ||
| 88 | - $array = [ | ||
| 89 | - 'category' => $this->category_name | ||
| 90 | - ]; | 88 | + $array = [ |
| 89 | + 'category' => $this->category_name | ||
| 90 | + ]; | ||
| 91 | 91 | ||
| 92 | 92 | ||
| 93 | - if (isset($filter['brands']) && count($filter['brands']) == 1 ) | ||
| 94 | - { | ||
| 95 | - $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one(); | 93 | + if (isset($filter['brands']) && count($filter['brands']) == 1) { |
| 94 | + $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one(); | ||
| 96 | 95 | ||
| 97 | - $array['brand'] = $model->name; | ||
| 98 | - } | 96 | + $array['brand'] = $model->name; |
| 97 | + } | ||
| 99 | 98 | ||
| 100 | - if ( isset($filter['options']["pol"]) && count($filter['options']["pol"]) == 1) | ||
| 101 | - { | 99 | + if (isset($filter['options']["pol"]) && count($filter['options']["pol"]) == 1) { |
| 102 | 100 | ||
| 103 | - $model = TaxOption::find()->where(['alias' => $filter['options']["pol"]])->one(); | ||
| 104 | - $array['sex'] = $model->value->value; | 101 | + $model = TaxOption::find()->where(['alias' => $filter['options']["pol"]])->one(); |
| 102 | + $array['sex'] = $model->value->value; | ||
| 105 | 103 | ||
| 106 | 104 | ||
| 107 | - } | 105 | + } |
| 108 | 106 | ||
| 109 | - if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1){ | 107 | + if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { |
| 110 | 108 | ||
| 111 | - $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); | ||
| 112 | - $array['naz'] = $model->value->value; | 109 | + $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); |
| 110 | + $array['naz'] = $model->value->value; | ||
| 113 | 111 | ||
| 114 | - } | 112 | + } |
| 115 | 113 | ||
| 116 | - if (isset($filter['options']["god"]) && count($filter['options']["god"]) == 1){ | ||
| 117 | - $model = TaxOption::find()->where(['alias' => $filter['options']["god"]])->one(); | ||
| 118 | - $array['year'] = $model->value->value; | 114 | + if (isset($filter['options']["god"]) && count($filter['options']["god"]) == 1) { |
| 119 | 115 | ||
| 116 | + $model = TaxOption::find()->where(['alias' => $filter['options']["god"]])->one(); | ||
| 117 | + $array['year'] = $model->value->value; | ||
| 118 | + | ||
| 119 | + } | ||
| 120 | + return $this->getTitleString($array); | ||
| 121 | + | ||
| 122 | + } else { | ||
| 123 | + return $this->project_name; | ||
| 120 | } | 124 | } |
| 121 | - return $this->getTitleString($array); | ||
| 122 | -// else { | ||
| 123 | -// return $this->project_name; | ||
| 124 | -// } | ||
| 125 | 125 | ||
| 126 | break; | 126 | break; |
| 127 | case self::DESCRIPTION: | 127 | case self::DESCRIPTION: |