How to use priceHtml() function on custom extension file

Hello All, I think all guys need to know how to use getPriceHtml() function on custom module in magento. Please check the following sample code to do it in very simpler way.
<?php
	//this is an example code and can be used in any .phtml file or controller class
	$product_block = new Mage_Catalog_Block_Product;
	
	//$product is product object
	echo $product_block->getPriceHtml($product);
	
	//if inside a loop than unset the Instance.
	unset($product_block);
?>
  Hope this article will help you. Thanks,
Pritesh Pritesh

Pritesh Pethani

Request a Quote!!

Share your concept and we will return to you within 24 hours. Let us work out the best software solution for you!

Let's Start
Whatspp