LinkedIn Twitter RSS Reset

Getting the Product's Price in current currency format of store

Magento gives an option to have different currency defined for each store. To get the product’s price based on the current store you can use the following code. It uses the default Magento’s helper class to do.

<?php

     /* @Class: Mage_Core_Helper_Data
     * The params for the currency function
     * @param   float $value
     * @param   bool $format
     * @param   bool $includeContainer
     */
echo Mage::helper('core')->currency($product->getFinalPrice(),true,false);

 ?>

In the code above $product is the product, whose price you will want to format.

2 Responses to “Getting the Product's Price in current currency format of store”

  1. April 8, 2011 at 1:11 am #

    It worked , But Why Did you use “”

  2. Le
    May 10, 2011 at 9:29 am #

    it’s greate code………….
    Thanks for your answer….

Leave a Comment