Home » Magento8 November 2010

Magento: Convert Price from Current Currency to Base Currency and vice-versa

Here is a quick code to convert price amount from current currency of the shop to base currency. This is applicable when you have a multiple currency shop.

From the code below, you can convert any currency you desire. You just need the ‘From Currency Code’ and ‘To Currency Code’. In the example below, I will be converting the current currency price to base currency price. You can do the vice-versa as well.

The currency convert function has the following parameters:-
currencyConvert($amount, $from, $to=null)

Changing price from any one currency to another

You can manually change any one currency price to another. Suppose, I have a price in USD and I want to change it to NPR. Then, I will write the following code:-

Hope this helps. Thanks.

Magento

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed