Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Решено] Описание категории на главной странице


Recommended Posts

Добрый вечер. Добавил описание категории на главную страницу, но  c описанием также выводятся и теги. Как их убрать?

Код в категории:

<div class="col-md-4 main-list-category">
        <a href="<?php echo $category['href']; ?>" class="list-group-item"><h3><?php echo $category['name']; ?></h3>
          <p><?php echo $category['description']; ?></p></a>

В контролере:

$data['categories'][] = array(
                'category_id' => $category['category_id'],
                'description' => $category['description'],
                'name'        => $category['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
                'children'    => $children_data,
                'href'        => $this->url->link('product/category', 'path=' . $category['category_id'])

Знімок екрана 2017-10-19 23.20.47.png

Знімок екрана 2017-10-19 23.24.49.png

Link to comment
Share on other sites

Декодируйте описание в контроллере.

'description' => html_entity_decode($category['description'], ENT_QUOTES, 'UTF-8'),


Link to comment
Share on other sites

  • 2 weeks later...

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

  • 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.