PHP Tier Price Table – Display on Product View Page

PHPtemplate

I am trying to edit my view.phtml in my theme to build a tierprice table on my product view page so I am trying to first just list the price tiers but nothing is showing up.

I have found the following code in : /app/design/frontend/base/default/template/bundle/catalog/product/view/tierprices.phtml

<?php
 $_product = $this->getProduct();
 $_tierPrices = $this->getTierPrices();
?>
<?php if (count($_tierPrices) > 0): ?>
 <ul class="tier-prices product-pricing">
 <?php foreach($_tierPrices as $_price): ?>
    <li><?php echo $this->__('Buy %1$s with %2$s discount each', $_price['price_qty'], '<strong class="benefit">'.($_price['price']*1).'%</strong>') ?></li>
<?php endforeach ?>
</ul>
<?php endif;?>

But when I paste it the view.phtml it shows nothing. But it is working at the top of the page next to the add to cart button ( default location ).

Can anyone point me in right direction here or see what I am doing wrong.

Best Answer

Please add following code in your view.phtml file

<?php echo $this->getTierPriceHtml() ?>
Related Topic