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

Описание подкатегории


vit2001
 Share

Recommended Posts

Доброго времени суток, не могу вывести описание подкатегории. 

 

В /catalog/controller/product/category.php

после строки:

'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),

добавляю строку: 

'description' => mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100,'UTF-8') . '..',

 

Дальше в: /catalog/view/theme/название темы/template/product/category.twig

после строки: <a href="{{ category.href }}">{{ category.name }}</a>

добавляю строку: {{ category.description }}

 

По игдеи должно выводить краткое описание в списках подкатегорий, а не выводит. Может кто уже икое гделал на опенкарт 3.0?

 

Link to comment
Share on other sites


После 
 

$data['categories'][] = array(

добавить
 

'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 90) . '..',

 

Link to comment
Share on other sites

5 minutes ago, Tom said:

После 
 

$data['categories'][] = array(

добавить
 

'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 90) . '..',

  

Все-равно не показывает, может в твиге что-то не то? 

Link to comment
Share on other sites


15 minutes ago, Tom said:

Кеш .

Спасипотому что за помощь

Кэш листил с админки, не помогало, обновил модификаторы и все зарилиило. Никак не могу привыкнуть к опенкарт 3.0

'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 90) . '..',
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.