Question

I want to display tier price table on my site's category page, but I have no idea regarding this at all. I have surf a lot but couldn't get any satisfactory solution. If any guy have an idea regarding this then please guide me. Your help would be appreciate a lot for me.

Was it helpful?

Solution

In theory this should work.

<?php echo $this->getTierPriceHtml($_product) ?> 

But it seams there is an issue that wasn't fixed until now.
A possible workaround could be this:

<?php $this->setProduct(Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($_product->getId()))?>
<?php echo $this->getTierPriceHtml() ?>
<?php $this->unsProduct($_product); // don't leave unnecessary data?>

Even if this works, I'm not sure it's a good idea to load the product in a loop (performance).
To overcome this, I think you can set the attribute tier_price to be Used in Product Listing and then you should be able to skip the load part and use only:

<?php $this->setProduct($_product)?>
<?php echo $this->getTierPriceHtml() ?>
<?php $this->unsProduct($_product); // don't leave unnecessary data?>

But I haven't tested it.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top