On the page where I show some previewed products I can't get the getTierPrices()
value. When I export that information on a span tag:
<span class="price">
<?php
echo 'From '.$this->getTierPrices()[2]['formated_price'];
?>
</span>
And on the catalog page I do get that information by using the getPriceHtml
.
So the code out there is:
<?php echo $this->getPriceHtml($_product) ?>
Do anyone know why I can see the tier priced value on the catalog product but nothing on the previous page?
Edited:
I finally found a way to do it. On the product list page I changed the code for:
$_coreHelper->formatPrice($_minimalPriceValue, false)
which refers to:
$_store->roundPrice($_store->convertPrice($_product->getMinimalPrice()));
So it seemed there was a variable with the information I wanted there which I could use. Doing this I got 0,00€ on the product page so I decided to change the $this->getPriceHtml($_product)
for:
$_tierPrices = $this->getTierPrices();
$countprice = count($_tierPrices);
echo "From: ".($_tierPrices[--$countprice]['formated_price']);
With this "function" I get the lesser price from the tierprices as I move to the last array data.