Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Magento store currency

I'm using Magento XML-RPC api. I haven't found how to get the current store country or currency used for the products. Is it possible to get the currency information through Magento XML-RPC api.

Any link to documentation is very helpful thank you.

like image 766
amadamala Avatar asked Jul 18 '12 20:07

amadamala


2 Answers

Store currency code eg. USD

$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();

store currency symbol eg. $

$currency_symbol = Mage::app()->getLocale()->currency( $currency_code )->getSymbol();

store currency name eg. US Dollar

$currency_name = Mage::app()->getLocale()->currency( $currency_code )->getName();

Reference

like image 129
Suman KC Avatar answered Sep 27 '22 00:09

Suman KC


Here you go:

$storeID = <whatever your store id is>;

Mage::app()->getStore($storeID)->getCurrentCurrencyCode();
like image 33
Gershon Herczeg Avatar answered Sep 25 '22 00:09

Gershon Herczeg