Commit bfe8d2735d80532e9be2252ccbeddb15eb5f6542
Merge branch 'remote_work' into 'master'
Remote work New merge request From Alex:remote_work into Alex:master See merge request !28
Showing
2 changed files
with
36 additions
and
10 deletions
 
Show diff stats
src/app/frontend/controllers/PageController.php
| ... | ... | @@ -911,18 +911,43 @@ | 
| 911 | 911 | |
| 912 | 912 | |
| 913 | 913 | $seo = $this->seoUrl->getSeoData($this->models->getSeoInfo()->getAllSeo()); | 
| 914 | - $catalog_name = ''; | |
| 915 | - | |
| 914 | + $catalog_name = $catalog['catalog']['title']; | |
| 915 | + $seo_text_size = null; | |
| 916 | + $seo_text_color = null; | |
| 917 | + if(isset($item['0']['size']) && !empty($item['0']['size'])) { | |
| 918 | + $seo_text_size = ' /' . $item['0']['size'] . '/ '; | |
| 919 | + } | |
| 920 | + if(count($sizes_colors__) > 1) | |
| 921 | + $seo_text_color = $item['0']['color_title'] ; | |
| 922 | + $seo_text_SubTitlePlusTitle = null; | |
| 923 | + if(isset($catalog['catalog']['sub']['sub']['title'])) { | |
| 924 | + if (strpos(mb_strtolower($catalog['catalog']['sub']['sub']['title'], 'UTF-8'), mb_strtolower($item['0']['title'], 'UTF-8')) === false) { | |
| 925 | + $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['sub']['title'] . ' ' . $item['0']['title']; | |
| 926 | + } else | |
| 927 | + $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['sub']['title']; | |
| 928 | + } | |
| 929 | + else if(isset($catalog['catalog']['sub']['title'])) { | |
| 930 | + if($catalog['catalog']['sub']['title'] == "Семена газонных трав" ||$catalog['catalog']['sub']['title'] == "Насіння газонних трав" ||$catalog['catalog']['sub']['title'] == "БИО" ||$catalog['catalog']['sub']['title'] == "БІО"){ | |
| 931 | + // || $catalog['catalog']['sub']['title'] == "Удобрения" || $catalog['catalog']['sub']['title'] == "Добрива" | |
| 932 | + $seo_text_SubTitlePlusTitle = $item['0']['title']; | |
| 933 | + | |
| 934 | + } | |
| 935 | + else if (strpos(mb_strtolower($catalog['catalog']['sub']['title'], 'UTF-8'), mb_strtolower($item['0']['title'], 'UTF-8')) === false && strpos(mb_strtolower($item['0']['title'], 'UTF-8'), mb_strtolower($catalog['catalog']['sub']['title'], 'UTF-8')) === false) { | |
| 936 | + $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['title'] . ' ' . $item['0']['title']; | |
| 937 | + } else | |
| 938 | + $seo_text_SubTitlePlusTitle = $item['0']['title']; | |
| 939 | + } | |
| 940 | + | |
| 916 | 941 | $meta_title = | 
| 917 | 942 | [ | 
| 918 | - '1' => isset($seo['title']) && !empty($seo['title']) ? $seo['title'] : $catalog_name . ' ' . $item['0']['title'] . ' в Києві | Купити ' . $catalog_name . ' ' . $item['0']['title'] . ' ціна оптом Львів | Інтернет магазин насіння Semena.in.ua', | |
| 919 | - '2' => isset($seo['title']) && !empty($seo['title']) ? $seo['title'] : $catalog_name . ' ' . $item['0']['title'] . ' в Киеве | Купить ' . $catalog_name . ' ' . $item['0']['title'] . ' цена оптом Львов | Интернет магазин семян Semena.in.ua', | |
| 920 | - ]; | |
| 943 | + '1' => $seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купити насіння поштою Київ, Львів, Україна | Semena.in.ua', | |
| 944 | + '2' => $seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купить семена почтой Киев, Львов, Украина | Semena.in.ua', | |
| 945 | + ];//isset($seo['title']) && !empty($seo['title']) ? $seo['title'] : | |
| 921 | 946 | |
| 922 | 947 | $meta_description = | 
| 923 | 948 | [ | 
| 924 | - '1' => isset($seo['description']) && !empty($seo['description']) ? $seo['description'] : 'Професіонали рекомендують ' . $catalog_name . ' ' . $item['0']['title'] . ' в інтернет магазині насіння Semena.in.ua.', | |
| 925 | - '2' => isset($seo['description']) && !empty($seo['description']) ? $seo['description'] : 'Профессионалы рекомендуют ' . $catalog_name . ' ' . $item['0']['title'] . ' в интернет магазине семян Semena.in.ua.' | |
| 949 | + '1' => isset($seo['description']) && !empty($seo['description']) ? $seo['description'] : $seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купить с доставкой поштою по Україні в інтернет-магазині насіння Semena.in.ua', | |
| 950 | + '2' => isset($seo['description']) && !empty($seo['description']) ? $seo['description'] : $seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купить с доставкой почтой по Украине в интернет-магазине семян Semena.in.ua' | |
| 926 | 951 | ]; | 
| 927 | 952 | |
| 928 | 953 | //discount | 
| ... | ... | @@ -938,8 +963,9 @@ | 
| 938 | 963 | else { | 
| 939 | 964 | $users_group_discount = 0; | 
| 940 | 965 | } | 
| 941 | - | |
| 966 | + $h1 = $item['0']['title'].' '.$item['0']['color_title']. ' '. $item['0']['size'] ; | |
| 942 | 967 | $this->view->setVars([ | 
| 968 | + 'h1' => $h1, | |
| 943 | 969 | 'change_lang_url' => $lang_url, | 
| 944 | 970 | 'catalog' => $catalog, | 
| 945 | 971 | 'item' => $item['0'], | ... | ... | 
src/app/frontend/views/page/item.php
| ... | ... | @@ -75,7 +75,7 @@ | 
| 75 | 75 | </div> | 
| 76 | 76 | |
| 77 | 77 | <div class="float item_content"> | 
| 78 | - <div class="item_title"><h1 class="item_name_h1" itemprop="name"><?= $item['title'] ?></h1></div> | |
| 78 | + <div class="item_title"><h1 class="item_name_h1" itemprop="name"><?= $h1 ?></h1></div> | |
| 79 | 79 | <div class="item_decription"><?= $item['description'] ?></div> | 
| 80 | 80 | <div style="float:right;width:270px;font-weight:bold;line-height:20px;"> | 
| 81 | 81 | <img src="/images/truck.jpg" width="64" height="64" border="0" align="left" style="margin-right:10px;" /> | 
| ... | ... | @@ -119,7 +119,7 @@ | 
| 119 | 119 | if( isset( $sizes_colors__[$item['color_id']][$s] ) ) | 
| 120 | 120 | { | 
| 121 | 121 | $data_sizes .= | 
| 122 | - '<a href="'.$sizes_colors__[$item['color_id']][$s]['link'].'" class="group_sizes'.($s == $item['size'] ? ' active' : '').' exist" style="padding-top:'.($i*3).'px; width:'.(31+($i*3)).'px" data-item_id="'.$sizes_colors__[$item['color_id']][$s]['id'].'" data-catalog_id="'.$catalog_id.'" data-group_alias="'.$group_alias.'">'. | |
| 122 | + '<a href="'.$this->seoUrl->setUrl($sizes_colors__[$item['color_id']][$s]['link']).'" class="group_sizes'.($s == $item['size'] ? ' active' : '').' exist" style="padding-top:'.($i*3).'px; width:'.(31+($i*3)).'px" data-item_id="'.$sizes_colors__[$item['color_id']][$s]['id'].'" data-catalog_id="'.$catalog_id.'" data-group_alias="'.$group_alias.'">'. | |
| 123 | 123 | '<span class="group_sizes_header"></span>'. | 
| 124 | 124 | '<span class="group_sizes_content">'.$s.'</span>'. | 
| 125 | 125 | '</a>'; | ... | ... | 
