I have a magento store with two currency, and my items in cart have a dynamic price. I succesfully calculate my quote_item price, with an observer and setCustomPrice and setOriginalCustom price.


1 Answer 1


HI you need to always convert the price to base price currency because of setCustomPrice() always work on base currency.

$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode(); 
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();

// convert price from current currency to base currency
$baseprice= Mage::helper('directory')->currencyConvert($price, $currentCurrencyCode, $baseCurrencyCode); 
// convert price from base currency to current currency
$baseprice= Mage::helper('directory')->currencyConvert($price, $baseCurrencyCode, $currentCurrencyCode); 

  • Hi amit am sourav . please can you come online at skype.
    – Sourav
    Commented Apr 8, 2015 at 5:39
  • checkout_cart_product_add_after am using the this event
    – Sourav
    Commented Apr 8, 2015 at 5:39
  • Fatal error: Call to a member function getCode() on a non-object in F:\xamp\htdocs\magento1.9.1\app\code\core\Mage\Directory\Model\Currency.php on line 206 this error occuring
    – Sourav
    Commented Apr 8, 2015 at 5:59
  • check currency rate set in amdin
    – Amit Bera
    Commented Apr 8, 2015 at 6:30
  • alredy set in currency rate option
    – Sourav
    Commented Apr 8, 2015 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.