<?php $_product = Mage::getModel('catalog/product')->load($product->getId()); $productBlock = $this->getLayout()->createBlock('catalog/product_price'); echo $productBlock->getPriceHtml($_product); ?>
Categories: Magento
<?php $_product = Mage::getModel('catalog/product')->load($product->getId()); $productBlock = $this->getLayout()->createBlock('catalog/product_price'); echo $productBlock->getPriceHtml($_product); ?>
1 Comment
Suman Pradhan · August 28, 2017 at 12:19 am
If you are trying it from a cms page, it will work if set the block type like “catalog/product_list” and if you call the price html in loop it will work. e.g {{ block type=”catalog/product_list” template=”yourtemplate/yourtemplate.phtml” }} and in loop call $this->getPriceHtml($_product); . It will work too.
It will work also for custom layout like. Hope it will help. 🙂