0

I have a customer, who has a tier price for almost every product in their webshop. But some products don't have a tier price. In template/catalog/product/list.phtml the tier price is added through this:

<?php echo $this->gettierPriceHtml($_product, true) ?>

Which displays template/catalog/product/view/tierprices.phtml

But how to show the default price when there is no tierprice for this product?

1

May be tier price does not implement properly at list.phtml.Check this answer: https://magento.stackexchange.com/a/61439/4564. How to show tier price at list.phtml

In order show default price at list.phtml you need to call <?php echo $this->getPriceHtml($_product, true) ?>

Solution:

 if($_product->getTierPrice()): 
 $this->getLayout()->createBlock('catalog/product_price')
   ->setTemplate('catalog/product/view/tierprices.phtml')
            ->setProduct($_product)
      ->setName('tier_'.$_product->getId())           
            ->setInGrouped($_product->isGrouped())
            ->setParent(null)
            ->callParentToHtml();
 else:
  echo $this->getPriceHtml($_product, true) ;
endif;             

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.