Manually convert currency in Magento

Magento, Web Development

Super quick manual conversion from GBP to Euro.

Pretty deep in some hefty Magento ecommerce development so apologies for the lack of geek tutorials of late. But here’s something that has come in pretty useful for a couple of projects recently and figured I’d share and save a fellow custom coder some precious time!

If you ever need to change a specific price or value to an alternative currency in Magento, just call the following:

Mage::helper('directory')->currencyConvert($pricein, 'GBP', 'EUR');

This should work from any Model or Block, the above example will convert GBP to Euro. Handy if you need to update things like static blocks with the most up-to-date delivery pricing.

Posted on by Pete

Post a Message

Scribble your thoughts below to leave a comment and then just click send! Fields marked * are required. Your email address will not be published.

Trying to track something?

Simply type and click track!

Track.
  •  
Follow.

Last.fm

Coffee – Casanova 2013/05/31

Design Store

Daily Culture

And Also...