7

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.

amadamala
  • 323
  • 1
  • 4
  • 18

2 Answers2

20

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

Suman KC
  • 3,478
  • 4
  • 30
  • 42
9

Here you go:

$storeID = <whatever your store id is>;

Mage::app()->getStore($storeID)->getCurrentCurrencyCode();
Gershon Herczeg
  • 3,016
  • 23
  • 33
  • 3
    Thanks for the quick response. Unfortunately I can't do it. Consider that I'm a third party application developer. I just have permissions to access Magento store through Magento XML-RPC api. And I'm using Java for XML-RPC requests. What I'm trying to do is get current currency code through one of the API calls. – amadamala Jul 18 '12 at 21:56
  • I am facing the same problem..please someone give an example to call a method like getting all the sales order list in java through xmlrpc – Haresh Chaudhary Jul 19 '12 at 12:40