Commit 4b62b15f7a03adf7771353f0ae8fed526a590986
1 parent
0436d2e2
add variantSku
Showing
3 changed files
with
25 additions
and
24 deletions
Show diff stats
models/SeoDynamicLang.php
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | * @property string $h1 |
| 17 | 17 | * @property string $key |
| 18 | 18 | * @property string $meta |
| 19 | - * @property string $meta_description | |
| 19 | + * @property string $description | |
| 20 | 20 | * @property string $seo_text |
| 21 | 21 | * @property Language $language |
| 22 | 22 | * @property SeoDynamic $seoDynamic |
| ... | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | return [ |
| 49 | 49 | [ |
| 50 | 50 | [ |
| 51 | - 'meta_description', | |
| 51 | + 'description', | |
| 52 | 52 | 'seo_text', |
| 53 | 53 | ], |
| 54 | 54 | 'string', |
| ... | ... | @@ -104,7 +104,7 @@ |
| 104 | 104 | 'h1' => 'h1', |
| 105 | 105 | 'key' => 'key', |
| 106 | 106 | 'meta' => 'meta', |
| 107 | - 'meta_description' => 'meta description', | |
| 107 | + 'description' => 'description', | |
| 108 | 108 | 'seo_text' => 'seo text', |
| 109 | 109 | ]; |
| 110 | 110 | } | ... | ... |
views/seo-dynamic/_form_language.php
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <?= $form->field($model_lang, '[' . $language->id . ']title') |
| 18 | 18 | ->textInput([ 'maxlength' => true ]); ?> |
| 19 | 19 | |
| 20 | -<?= $form->field($model_lang, '[' . $language->id . ']meta_description')->textarea() ?> | |
| 20 | +<?= $form->field($model_lang, '[' . $language->id . ']description')->textarea() ?> | |
| 21 | 21 | |
| 22 | 22 | <?= $form->field($model_lang, '[' . $language->id . ']key') |
| 23 | 23 | ->textInput([ 'maxlength' => true ]) ?> | ... | ... |
widgets/Seo.php
| ... | ... | @@ -29,7 +29,7 @@ class Seo extends Widget |
| 29 | 29 | |
| 30 | 30 | |
| 31 | 31 | const SEO_TEXT = 'seo_text'; |
| 32 | - const DESCRIPTION = 'meta_description'; | |
| 32 | + const DESCRIPTION = 'description'; | |
| 33 | 33 | const META = 'meta'; |
| 34 | 34 | const H1 = 'h1'; |
| 35 | 35 | const TITLE = 'title'; |
| ... | ... | @@ -149,25 +149,26 @@ class Seo extends Widget |
| 149 | 149 | $filter = \Yii::$app->request->get('filters', []); |
| 150 | 150 | |
| 151 | 151 | $description = $this->selectSeoData(self::DESCRIPTION, $filter,$priority); |
| 152 | - | |
| 153 | - if (!empty($description)) { | |
| 154 | - | |
| 155 | - $this->getView()->registerMetaTag([ | |
| 156 | - 'name' => 'description', | |
| 157 | - 'content' => $this->prepareString($description) | |
| 158 | - ]); | |
| 159 | - | |
| 160 | - } else { | |
| 161 | - | |
| 162 | - if(!empty($filter)){ | |
| 163 | - $array = $this->arrayBuilder($filter); | |
| 164 | - $this->getView()->registerMetaTag([ | |
| 165 | - 'name' => 'description', | |
| 166 | - 'content' => $this->prepareString($this->getDescriptionString($array,$description)) | |
| 167 | - ]); | |
| 168 | - } | |
| 169 | - | |
| 170 | - } | |
| 152 | + print 'fdasfasd'; | |
| 153 | + die(); | |
| 154 | +// if (!empty($description)) { | |
| 155 | +// | |
| 156 | +// $this->getView()->registerMetaTag([ | |
| 157 | +// 'name' => 'description', | |
| 158 | +// 'content' => $this->prepareString($description) | |
| 159 | +// ]); | |
| 160 | +// | |
| 161 | +// } else { | |
| 162 | +// | |
| 163 | +// if(!empty($filter)){ | |
| 164 | +// $array = $this->arrayBuilder($filter); | |
| 165 | +// $this->getView()->registerMetaTag([ | |
| 166 | +// 'name' => 'description', | |
| 167 | +// 'content' => $this->prepareString($this->getDescriptionString($array,$description)) | |
| 168 | +// ]); | |
| 169 | +// } | |
| 170 | +// | |
| 171 | +// } | |
| 171 | 172 | |
| 172 | 173 | break; |
| 173 | 174 | case self::META: | ... | ... |