Commit a666f0437eb1ae78e1b180b9d451f5beba27af6e
1 parent
61531d3b
new Tytle H1 description
Showing
2 changed files
with
23 additions
and
10 deletions
Show diff stats
src/app/frontend/controllers/PageController.php
... | ... | @@ -914,23 +914,35 @@ |
914 | 914 | $catalog_name = $catalog['catalog']['title']; |
915 | 915 | $seo_text_size = null; |
916 | 916 | $seo_text_color = null; |
917 | - if(count($sizes) > 1) { | |
917 | + if(isset($item['0']['size']) && !empty($item['0']['size'])) { | |
918 | 918 | $seo_text_size = ' /' . $item['0']['size'] . '/ '; |
919 | 919 | } |
920 | 920 | if(count($sizes_colors__) > 1) |
921 | 921 | $seo_text_color = $item['0']['color_title'] ; |
922 | 922 | $seo_text_SubTitlePlusTitle = null; |
923 | - if(strpos(mb_strtolower($catalog['catalog']['sub']['sub']['title'],'UTF-8'), mb_strtolower($item['0']['title'],'UTF-8')) === false){ | |
924 | - $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['sub']['title'] .' '. $item['0']['title']; | |
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']; | |
925 | 939 | } |
926 | - else | |
927 | - $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['sub']['title']; | |
928 | 940 | |
929 | 941 | $meta_title = |
930 | 942 | [ |
931 | - '1' => isset($seo['title']) && !empty($seo['title']) ? $seo['title'] : $catalog_name . ': '.$seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купити насіння поштою Київ, Львів, Україна | Semena.in.ua', | |
932 | - '2' => isset($seo['title']) && !empty($seo['title']) ? $seo['title'] : $catalog_name . ': '.$seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купить семена почтой Киев, Львов, Украина | Semena.in.ua', | |
933 | - ]; | |
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'] : | |
934 | 946 | |
935 | 947 | $meta_description = |
936 | 948 | [ |
... | ... | @@ -951,8 +963,9 @@ |
951 | 963 | else { |
952 | 964 | $users_group_discount = 0; |
953 | 965 | } |
954 | - | |
966 | + $h1 = $item['0']['title'].' '.$item['0']['color_title']. ' '. $item['0']['size'] ; | |
955 | 967 | $this->view->setVars([ |
968 | + 'h1' => $h1, | |
956 | 969 | 'change_lang_url' => $lang_url, |
957 | 970 | 'catalog' => $catalog, |
958 | 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"><?= count($sizes_colors__) > 1 ?$item['title'].' '.$item['color_title'] :$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;" /> | ... | ... |