I've tried to access discounts data in category.php via:
Code: Select all
$discounts_data = $this->model_catalog_product->getProductDiscounts($result['product_id']);
$discounts = array();
foreach ($discounts_data as $discount) {
$discounts[] = array(
'quantity' => $discount['quantity'],
'price' => $this->currency->format($this->tax->calculate($discount['price'], $result['tax_class_id'], $this->config->get('config_tax')))
);
}
Then in category.tpl I've tried to access that data via $product['discount'], but it seems that no values get passed over from category.php. Does anyone have an idea how to do this?
Thanks a lot