Mar 18, 2014
76 Views

[Magento] get price and special price product magento

Written by

Loading Product
$_productId = 52;
$_product = Mage::getModel(‘catalog/product’)->load($_productId);

–  Get Regular Price chưa có phần formart theo currency.
$_actualPrice = $_product->getPrice();

 – Get Regular Price  đã formart theo currency.
$_formattedActualPrice = Mage::helper(‘core’)->currency($_product->getPrice(),true,false);

Get Special Price
// special price chưa có formart theo currency.
$_specialPrice = $_product->getSpecialPrice();

//  specila price đã formart theo currency
$_formattedSpecialPrice = Mage::helper(‘core’)->currency($_product->getSpecialPrice(),true,false);

Article Categories:
Code/Web
    http://linholiver.com

    https://linholiver.com/diary/about/