Pages

Monday, 10 November 2014

Magento: How to get actual price and special price of a product?

Loading Product
$_productId = 52;
$_product = Mage::getModel('catalog/product')->load($_productId);
Get Actual Price
// without currency sign
$_actualPrice = $_product->getPrice();
// with currency sign
$_formattedActualPrice = Mage::helper('core')->currency($_product->getPrice(),true,false);
Get Special Price
// without currency sign
$_specialPrice = $_product->getFinalPrice();
// with currency sign
$_formattedSpecialPrice =Mage::helper('core')->currency($_product->getFinalPrice(),true,false);

No comments:

Post a Comment