В catalog/controller/module/popular.php после строк:
if ($this->config->get('config_review_status')) {
$rating = $result['rating'];
} else {
$rating = false;
}
добавил:
$discounts = $this->model_catalog_product->getProductDiscounts($result['product_id']);
$data['discounts'] = array();
foreach ($discounts as $discount) {
$data['discounts'][] = array(
'quantity' => $discount['quantity'],
'price' => $this->currency->format($this->tax->calculate($discount['price'], $result['tax_class_id'], $this->config->get('config_tax')))
);
}
здесь же, после строки:
$data['products'][] = array(
добавил:
'discounts' => $discounts,
В catalog/view/theme/default/template/module/popular.tpl добавил:
<?php if ($product['discounts']) { ?>
<?php foreach ($product['discounts'] as $discount) { ?>
<p><?php echo $discount['price'] ?></p>
<p> от <?php echo $discount['quantity'] ?> ед.</p>
<?php } ?>
<?php } ?>
Работает, но выводится discount цена только в ДОЛЛАРАХ, и не реагирует на смену валют. Что это может быть, почему не отрабатывает "$this->currency" ?