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 | 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 | 24 | RewriteRule ^storage/(.*)?$ /storage/$1 [L,PT] |
| 20 | 25 | |
| ... | ... | @@ -85,7 +90,6 @@ AddDefaultCharset utf-8 |
| 85 | 90 | |
| 86 | 91 | |
| 87 | 92 | |
| 88 | - | |
| 89 | 93 | # RewriteCond %{HTTP_HOST} ^([^www].*)$ |
| 90 | 94 | # RewriteRule ^(.*)$ http://www.%1/$1 [R=301] |
| 91 | 95 | ... | ... |
frontend/config/main.php
frontend/views/catalog/product.php
| ... | ... | @@ -113,7 +113,9 @@ $this->registerJs (" |
| 113 | 113 | data-image="<?= \common\components\artboximage\ArtboxImageHelper::getImageSrc($variant->imageUrl, 'product_view') ?>" |
| 114 | 114 | data-imageoriginal="<?= $variant->imageUrl ?>" |
| 115 | 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 | 119 | </a> |
| 118 | 120 | </li> |
| 119 | 121 | <?php endforeach; ?> |
| ... | ... | @@ -129,7 +131,7 @@ $this->registerJs (" |
| 129 | 131 | <span class="cost"><span id='cost'>0</span> <span class="valute">грн.</span></span> |
| 130 | 132 | </div> |
| 131 | 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 | 135 | <div class="both"></div> |
| 134 | 136 | </div> |
| 135 | 137 | |
| ... | ... | @@ -146,7 +148,8 @@ $this->registerJs (" |
| 146 | 148 | <?php endif?> |
| 147 | 149 | </ul> |
| 148 | 150 | </div> |
| 149 | - | |
| 151 | + <br> | |
| 152 | + <div class="ya-share2" data-services="vkontakte,facebook,odnoklassniki,gplus,twitter" data-size="s"></div> | |
| 150 | 153 | </div> |
| 151 | 154 | <?php /* |
| 152 | 155 | <div class="product_service"> |
| ... | ... | @@ -193,13 +196,17 @@ $this->registerJs (" |
| 193 | 196 | <div class="content"> |
| 194 | 197 | <div class="pic"> |
| 195 | 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 | 202 | </center> |
| 198 | 203 | </div> |
| 199 | 204 | <ul class="product_colors"> |
| 200 | 205 | <?php foreach ($product->images as $image): ?> |
| 201 | 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 | 210 | </a></li> |
| 204 | 211 | <?php endforeach; ?> |
| 205 | 212 | </ul> | ... | ... |
frontend/views/catalog/product_item.php
| ... | ... | @@ -6,7 +6,9 @@ use yii\helpers\Url; |
| 6 | 6 | <div class="boxitem"> |
| 7 | 7 | <div class="pixbox"> |
| 8 | 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 | 12 | </a> |
| 11 | 13 | </div> |
| 12 | 14 | <?php if(!empty($product->is_top) || !empty($product->is_new) || !empty($product->akciya)) :?> |
| ... | ... | @@ -61,7 +63,9 @@ use yii\helpers\Url; |
| 61 | 63 | 'catalog/product', |
| 62 | 64 | 'product' => $product, |
| 63 | 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 | 69 | </a> |
| 66 | 70 | </li> |
| 67 | 71 | <?php endif; ?> | ... | ... |
frontend/views/layouts/main.php
| ... | ... | @@ -95,6 +95,7 @@ $this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['posi |
| 95 | 95 | ga('create', 'UA-75674711-1', 'auto'); |
| 96 | 96 | ga('send', 'pageview'); |
| 97 | 97 | </script> |
| 98 | + <meta name="google-site-verification" content="niSpd01ftupUt3pFCfQkh2zoezuPuUGblNOSGs-iRWo" /> | |
| 98 | 99 | </head> |
| 99 | 100 | <body> |
| 100 | 101 | <!-- Google Tag Manager --> | ... | ... |
frontend/views/products/show.php
| ... | ... | @@ -115,7 +115,7 @@ use yii\widgets\Breadcrumbs; |
| 115 | 115 | <span class="cost"><span id='cost'>0</span> <span class="valute">грн.</span></span> |
| 116 | 116 | </div> |
| 117 | 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 | 119 | <div class="both"></div> |
| 120 | 120 | </div> |
| 121 | 121 | ... | ... |
frontend/widgets/Seo.php
| ... | ... | @@ -83,45 +83,45 @@ class Seo extends Widget |
| 83 | 83 | |
| 84 | 84 | if (!empty($title)) { |
| 85 | 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 | 126 | break; |
| 127 | 127 | case self::DESCRIPTION: | ... | ... |