Модуль «Отзывы» для OpenCart 1.4.9.х
- Stats: 1337 0
- Author: admin
- Category: Модулі Opencart 1.4.9, Плагіни та розширення
- Comments: Комментариев нет

Модуль Reviews Random позволяет вывести блок «Отзывы» в левой или правой колонке.Язык: Русский
Дополнительно:
Когда отзыв длинный, выводиться в конце знак вопроса — решение данного бага:
Откройте файл:
catalog\controller\module\reviews.php
Найдите такой код:
$this->data['reviews_random'][] = array (
'name' => $result['name'],
'rating' => $result['rating'],
'text' => strip_tags (substr ($result['text'], 0, 80)),
'stars' => sprintf ($this->language->get ('text_stars'), $result['rating']),
'image' => $this->model_tool_image->resize ($image, 40, 40),
'href' => $this->model_tool_seo_url->rewrite (HTTPS_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id'])
);
'name' => $result['name'],
'rating' => $result['rating'],
'text' => strip_tags (substr ($result['text'], 0, 80)),
'stars' => sprintf ($this->language->get ('text_stars'), $result['rating']),
'image' => $this->model_tool_image->resize ($image, 40, 40),
'href' => $this->model_tool_seo_url->rewrite (HTTPS_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id'])
);
И замените его на этот код:
$cut_descr_symbols = 90;
$descr_plaintext = strip_tags (html_entity_decode ($result['text'], 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['reviews_random'][] = array (
'name' => $result['name'],
'rating' => $result['rating'],
'text' => $descr_plaintext,
'stars' => sprintf ($this->language->get ('text_stars'), $result['rating']),
'image' => $this->model_tool_image->resize ($image, 40, 40),
'href' => $this->model_tool_seo_url->rewrite (HTTPS_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id'])
);
$descr_plaintext = strip_tags (html_entity_decode ($result['text'], 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['reviews_random'][] = array (
'name' => $result['name'],
'rating' => $result['rating'],
'text' => $descr_plaintext,
'stars' => sprintf ($this->language->get ('text_stars'), $result['rating']),
'image' => $this->model_tool_image->resize ($image, 40, 40),
'href' => $this->model_tool_seo_url->rewrite (HTTPS_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id'])
);
В этой строке:
$cut_descr_symbols = 90;
Меняете значение 90 на ваше (это ограничение вывода символов отзыва)
Скачать модуль Reviews Random для OpenCart
reviewsrandom1.4.9.zip (298 downloads)
Отправить ответ