您可以将此代码放在 list.phtml 或 view.phtml 中,以显示每个数量的等级价格。
$attribute = $_product->getResource()->getAttribute('tier_price');
$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
$symbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
if ($attribute) {
$attribute->getBackend()->afterLoad($_product);
$tierPrices = $_product->getTierPrice();
foreach($tierPrices as $tierPrice)
{
?>
<span class="priceqty"><?php echo '+'.round($tierPrice["price_qty"], 0);?></span><br>
<span class="pricetitle"><?php echo $symbol.number_format($tierPrice["price"], 2, '.', '');?></span>
<?php
}
}
?>