Hi Xavier
This was very helpful. I've changed the code as you suggested, just a couple of little problems. The result I have is in this format:
£ 168.00 ea
3 - 6 off = £ 160.00
6 - 10 off = £ 150.00
10 - off = £ 140.00
Can you advise how to get the first line of prices to say:
1 - 2 off = £ 168.00
And the last line of prices to say
10 + = £ 140.00
Many thanks - Leo
This is the code so far...
echo '<span class="'.implode(' ',$classes).'">';
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $this->params->get('per_unit',1)){
if($price->price_min_quantity>1){
$minQties = array();
foreach($this->row->prices as $priceBis){
$minQties[] = $priceBis->price_min_quantity;
}
foreach($minQties as $key => $minQty){
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $this->params->get('per_unit',1)){
if($price->price_min_quantity == $minQty){
$key++;
echo sprintf('%s - %s off = ',$price->price_min_quantity,$minQties[$key]);
}
}
}