Answer the question
In order to leave comments, you need to log in
How to disable the description of the "Promotions and discounts" category on pagination pages?
For SEO optimization, it is important that the same text is located on only one page. For the standard section "Promotions and discounts" I made a description output through the "HTML content" module, and since. There are a lot of products, it is displayed on all pagination pages of this category. How can this problem be solved?
There is a fairly popular module for Opencart called "Extra Description Category", where this feature is implemented by the following code:
in "catalog/controller/product/category.php"
if ($category_info['hide_extra_desc']) {
if (!isset($this->request->get['page']) || $this->request->get['page'] == 1) {
$data['extra_description'] = html_entity_decode($category_info['extra_description'], ENT_QUOTES, 'UTF-8');
}else{
$data['extra_description'] = '';
}
}else{
$data['extra_description'] = html_entity_decode($category_info['extra_description'], ENT_QUOTES, 'UTF-8');
}
Answer the question
In order to leave comments, you need to log in
I would do this if I were you:
1. Created 2 Scheme design - 1. For the first page (with a module), 2. For the rest (without a module)
2. In the controller of the desired position, for example content_bottom.php add after $layout_id = 0;
if ($route == 'product/special' && (!isset($this->request->get['page']) || $this->request->get['page'] == 1)) {
$layout_id = 1; // id схемы для первой страницы
} else {
$layout_id = 2; // id схемы для остальных страницы
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question