Magento - Tier Prices on Cart page

Add following after $_item = $this->getItem(); in checkout/cart/item/default.phtml

$_tierPricing = $this->getLayout()->createBlock('catalog/product_view',
'product.tierprices', array( 'product_id' => $_item->getProductId()));
$_tierPricing->setTemplate('catalog/product/view/tierprices.phtml');

To print price info:
<?php echo $_tierPricing->getTierPriceHtml();?>

OR

If you want retrieve tier prices for any other purposes, just for show discounts etc. Use followings.

$custom = Mage::getModel('catalog/product')->load($_item->getProductId()); 
var_dump($custom->getTierPrice());



Comments

Popular posts from this blog

Laravel Sail on Windows issue - "cmdlet Invoke-WebRequest at command pipeline position 1"

Laravel 10 - Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (Connection: mysql, SQL: alter table `users` add unique `users_email_unique`(`email`))