Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Вывод описания категории только на первой страниэто пагинации


ostapdesign
 Share

Recommended Posts

Здравствуйте. 

Появилась задача выводить описание категории только на первой страниэто пагинации.

Ггде находятся файлы отвечающие за вывод этот информации знаю. catalog/view/theme/*/template/product/category.tpl

Но какое нужно задать условие, чтоб этот текст выводился только на первой страниэто не имею понятия. 

Link to comment
Share on other sites


В catalog/controller/product/category.php меняем

$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');

на

if ($page == 1) {
    $this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
} else {
    $this->data['description'] = '';
}
  • +1 1
Link to comment
Share on other sites


 

В catalog/controller/product/category.php меняем

$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');

на

if ($page == 1) {
    $this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
} else {
    $this->data['description'] = '';
}

Спасипотому что огромное! Полулилось :-)

Link to comment
Share on other sites


  • 1 month later...

Здравствуйте! У меня почему-то иким спосопотому чтом не полулилось вывести описание категории на первой страниэто. Подскажите пожалуйси, может есть другой способ?

Link to comment
Share on other sites


  • 2 years later...
  • 5 years later...
В 17.02.2014 в 02:11, gavi сказал:

В catalog/controller/product/category.php меняем

$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');

на

if ($page == 1) {
    $this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
} else {
    $this->data['description'] = '';
}

 

Вообещё никак... опенкарт 2.3

 

Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) in /var/www/color-smoke/data/www/сайт.ру /system/storage/modification/catalog/controller/product/category.php on line 634

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.