Portfolio
My Blog
Scroll down to discover
Search
Categories

[Magento] get price and special price product magento

March 18, 2014Category : Code/Web

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);

Leave a Reply

Your email address will not be published. Required fields are marked *

01.
© Oliver / All rights reserved.
To top