Magento Format Price To Default Currency

Share

Use the below code to format a price according to default currency in Magento

$price = $_product->getPrice() 
/// This is in product details page. 
/// Replace it with necessary price value according to your requirement.
$formatted price = Mage::helper('core')->currency($price);
This entry was posted in Magento, PHP and tagged , . Bookmark the permalink.
 

2 Responses to Magento Format Price To Default Currency

  1. Reynold Hugh says:

    Little But Truly Helpful!
    Shopping Cart Website Design

  2. Niyi says:

    Hello

    This is a bit close to what I have been looking for. I called the prices for my products to the homepage using getFinalPrice() ?>. The Problem I am having is that a product that appears to be $1,000 on its product pages appeared as 1000.0000. I have tried all my little ideas of magento but still cannot get past this. The currency symbol is missing too.
    How can I resolve this jam? Any help will be appreciated please.
    Thanks

Leave a Reply

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

*