diff --git a/src/app/frontend/controllers/PageController.php b/src/app/frontend/controllers/PageController.php index e1de951..447ad54 100644 --- a/src/app/frontend/controllers/PageController.php +++ b/src/app/frontend/controllers/PageController.php @@ -914,23 +914,35 @@ $catalog_name = $catalog['catalog']['title']; $seo_text_size = null; $seo_text_color = null; - if(count($sizes) > 1) { + if(isset($item['0']['size']) && !empty($item['0']['size'])) { $seo_text_size = ' /' . $item['0']['size'] . '/ '; } if(count($sizes_colors__) > 1) $seo_text_color = $item['0']['color_title'] ; $seo_text_SubTitlePlusTitle = null; - if(strpos(mb_strtolower($catalog['catalog']['sub']['sub']['title'],'UTF-8'), mb_strtolower($item['0']['title'],'UTF-8')) === false){ - $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['sub']['title'] .' '. $item['0']['title']; + if(isset($catalog['catalog']['sub']['sub']['title'])) { + if (strpos(mb_strtolower($catalog['catalog']['sub']['sub']['title'], 'UTF-8'), mb_strtolower($item['0']['title'], 'UTF-8')) === false) { + $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['sub']['title'] . ' ' . $item['0']['title']; + } else + $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['sub']['title']; + } + else if(isset($catalog['catalog']['sub']['title'])) { + if($catalog['catalog']['sub']['title'] == "Семена газонных трав" ||$catalog['catalog']['sub']['title'] == "Насіння газонних трав" ||$catalog['catalog']['sub']['title'] == "БИО" ||$catalog['catalog']['sub']['title'] == "БІО"){ + // || $catalog['catalog']['sub']['title'] == "Удобрения" || $catalog['catalog']['sub']['title'] == "Добрива" + $seo_text_SubTitlePlusTitle = $item['0']['title']; + + } + 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) { + $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['title'] . ' ' . $item['0']['title']; + } else + $seo_text_SubTitlePlusTitle = $item['0']['title']; } - else - $seo_text_SubTitlePlusTitle = $catalog['catalog']['sub']['sub']['title']; $meta_title = [ - '1' => isset($seo['title']) && !empty($seo['title']) ? $seo['title'] : $catalog_name . ': '.$seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купити насіння поштою Київ, Львів, Україна | Semena.in.ua', - '2' => isset($seo['title']) && !empty($seo['title']) ? $seo['title'] : $catalog_name . ': '.$seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купить семена почтой Киев, Львов, Украина | Semena.in.ua', - ]; + '1' => $seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купити насіння поштою Київ, Львів, Україна | Semena.in.ua', + '2' => $seo_text_SubTitlePlusTitle. ' '. $seo_text_color.$seo_text_size.' купить семена почтой Киев, Львов, Украина | Semena.in.ua', + ];//isset($seo['title']) && !empty($seo['title']) ? $seo['title'] : $meta_description = [ @@ -951,8 +963,9 @@ else { $users_group_discount = 0; } - + $h1 = $item['0']['title'].' '.$item['0']['color_title']. ' '. $item['0']['size'] ; $this->view->setVars([ + 'h1' => $h1, 'change_lang_url' => $lang_url, 'catalog' => $catalog, 'item' => $item['0'], diff --git a/src/app/frontend/views/page/item.php b/src/app/frontend/views/page/item.php index 2c7d195..597d295 100644 --- a/src/app/frontend/views/page/item.php +++ b/src/app/frontend/views/page/item.php @@ -75,7 +75,7 @@
-

1 ?$item['title'].' '.$item['color_title'] :$item['title']?>

+

-- libgit2 0.21.4