Search
Categories
[Magento] get price and special price product magento
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);
01.
