На страниэто товара
пхп
$discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']);
$data['discounts'] = array();
foreach ($discounts as $discount) {
$data['discounts'][] = array(
'quantity' => $discount['quantity'],
'price' => $this->currency->format($this->tax->calculate($discount['price'] * $product_info['minimum'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']),
'price1' => $this->currency->format($this->tax->calculate($product_info['price'] * $product_info['minimum'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency'])
);
}
твиг
<li style="color: green;font-size: medium;padding-bottom: 10px;">за {{ discount['quantity'] / 2 }} шт: <strong style="color: #ff2a08;font-weight: bold;border: solid 2px;border-radius: 5px;padding: 1px;">{{ discount['price1'] }}</strong></li>
<li style="color: green;font-size: medium;">{{ text_discount }}{{ discount['quantity'] }} шт: <strong style="color: #ff2a08;font-weight: bold;border: solid 2px;border-radius: 5px;padding: 1px;">{{ discount['price'] }}</strong></li>
Как мне икое сгделать в категории?