Всем привет. Хотел вывести на странице категории товара его описание, по какой-то статье смог. Но вот незадача: описание выводится без форматирования, сплошным текстом. Как исправить? Вот кусок кода из category.tpl:
<div class="category-info">
<?php if ($thumb) { ?>
<div class="image"><img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" /></div>
<?php } ?>
<?php if ($description) { ?>
<?php echo $description; ?>
<?php } ?>
</div>
и кусок из category.php, если понадобится:
$cut_descr_symbols = 3000;
$descr_plaintext = strip_tags(html_entity_decode($result['description'],
ENT_QUOTES, 'UTF-8'));
if( mb_strlen($descr_plaintext, 'UTF-8') > $cut_descr_symbols )
{
$descr_plaintext = mb_substr($descr_plaintext, 0,
$cut_descr_symbols, 'UTF-8') . ' …';
}
$this->data['products'][] = array(
'product_id' => $result['product_id'],
'thumb' => $image,
'name' => $result['name'],
'description' => $descr_plaintext,
'price' => $price,
'special' => $special,
'tax' => $tax,
'rating' => $result['rating'],
'reviews' => sprintf($this->language->get('text_reviews'),
(int)$result['reviews']),
'href' => $this->url->link('product/product', 'path='
. $this->request->get['path']
. '&product_id=' . $result['product_id']),
'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id'])
);
ну и напоследок - пример: категория, сам товар.