Home » Magento

Magento: Format Price

23 November 2009 708 views One Comment Popularity: 8% Share/Bookmark

When you fetch product data, you get the price as integer. Now, you must display the price with currency suffix. You can do this with the following code:-

// let $_finalPrice be the integer price fetched

$formattedPrice = Mage::helper('core')->currency($_finalPrice,true,false);

From Mukesh Chapagain's Blog | Post Magento: Format Price

Related posts:

  1. Magento: Setup multiple currency shop
  2. Magento: How to get Currency Rates?
  3. jQuery: Grey out background and preview image as popup
  4. Magento: Show Currency Selector in right sidebar
  5. Magento: How to change Currency symbol by Model Override ?

One Comment »

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.