In my store I need to calculate dynamic prices. I found the following code in several tutorials.


$item = $obs->getQuoteItem();
$item = ( $item->getParentItem() ? $item->getParentItem() : $item );
$price = "your custom price logic";

For storeviews where BaseCurrency=StoreCurrency it works. But when the store Currency differs from the base currency i get unexpected results.


BaseCurrency = EUR
StoreCurrency = USD

Now I set the Price in my code to 1.

I would expect that magento displays either ~1.28$ or 1$

But it comes up with 0.78$

1 Answer 1


Maybe you are doing the conversion wrong. Instead of $price * $rate you are doing $price / $rate (or the other way around).

I say this because 1.28 / 1 = 1/0.78 (aproximately)

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.