I have a problem i cant figure out (mainly because of my lack of experience) When i search for an product which is a grouped product it shows the lowest price which is what i need. However some of these product have tiered prices as well (buy 5 for £3) so i want the tiered price to be displayed on the search and product list pages. I have found the code which displays the lowest price, but i dont know how to check if the product has a tiered price and if so to diplay that price instead of the lowest. I assume you would need an IF statement to check where there is a tiered price on any of the products and if true then display it but i do not know how to code this.
This is the code which is being using to display the lowest price:
<?php else: /* if (!$_product->isGrouped()): */ ?>
<?php
$showMinPrice = $this->getDisplayMinimalPrice();
if ($showMinPrice && $_minimalPriceValue) {
$_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
$_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
$price = $showMinPrice ? $_minimalPriceValue : 0;
} else {
$price = $_convertedFinalPrice;
$_exclTax = $_taxHelper->getPrice($_product, $price);
$_inclTax = $_taxHelper->getPrice($_product, $price, true);
}
?>
<?php if ($price): ?>
<div class="price-box">
<p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
<?php if ($showMinPrice): ?>
<span class="price-label"><?php echo $this->__('As low as') ?></span>
<?php endif ?>
<?php if ($_taxHelper->displayBothPrices()): ?>
<span class="price-excluding-tax">
<span class="label"><?php echo $this->helper('tax')->__('Excl. VAT') ?></span>
<span class="price"
id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<?php echo $_coreHelper->formatPrice($_exclTax, false) ?>
</span>
</span>
<!-- <span class="price-including-tax">
<span class="label"><?php// echo $this->helper('tax')->__('Incl. VAT') ?></span>
<span class="price"
id="price-including-tax-<?php //echo $_id ?><?php //echo $this->getIdSuffix() ?>">
<?php //echo $_coreHelper->formatPrice($_inclTax, false) ?>
</span>
</span>-->
<?php else: ?>
<?php
$_showPrice = $_inclTax;
if (!$_taxHelper->displayPriceIncludingTax()) {
$_showPrice = $_exclTax;
}
?>
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<?php echo $_coreHelper->formatPrice($_showPrice, false) ?>
</span>
<?php endif; ?>
</p>
</div>
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
<?php endif; /* if (!$_product->isGrouped()): */ ?>
I assume the If statement would off like this:
if ( $_product->getTierPrice()): ?>
<?php endif; ?>
My main issue is I am not sure what to put inside the statement or where to put it.
If anyone could help that would be great. Also if i have not been to clear or you need more information just let me know.
Thank you