Rysio Posted August 19, 2010 Share Posted August 19, 2010 Hi,I'm trying get active currencie's iso_code, and I can't achieve that.I know that it's easy to get currencie's id, like:global $cookie;$currency = $cookie->id_currency; ...but would prefer to have rather iso_code than id_currency.How to do that?Can someone help? Link to comment Share on other sites More sharing options...
DevNet Posted August 19, 2010 Share Posted August 19, 2010 You can access to the currency object like over smarty{$currency->iso_code} {$currency} Currency Object (9) ->id = 1 ->name = "Euro" ->iso_code = "EUR" ->sign = "€" ->blank = "1" ->conversion_rate = "1.000000" ->deleted = "0" ->format = "2" ->decimals = "1" Or you can access with currency object in php 5 Link to comment Share on other sites More sharing options...
Bhim Posted August 20, 2010 Share Posted August 20, 2010 Thanks!!! DevNet for this code i am here to post same problem but it is already posted by my unknow friend also thanks to him. Link to comment Share on other sites More sharing options...
jose carlos Posted July 17, 2012 Share Posted July 17, 2012 How iso_code lang actual, no $languages->iso_code, help please? thanks Link to comment Share on other sites More sharing options...
stefan2 Posted December 29, 2014 Share Posted December 29, 2014 Prestashop 1.6.0.9 It was good for me but NOT ALWAYS (Class BankWire{} in my case): global $currency; $my_currency_iso_code = $currency->iso_code; because $currency variable was sometimes NULL, but i make: global $cookie; $currency = new CurrencyCore($cookie->id_currency); $my_currency_iso_code = $currency->iso_code; and it's work well 1 Link to comment Share on other sites More sharing options...
ilclaudio Posted September 30, 2016 Share Posted September 30, 2016 Hi, on tpl page I've use this syntax and works well: {assign currency Currency::getDefaultCurrency()->sign} {assign currency_code Currency::getDefaultCurrency()->iso_code} {$currency} {$currency_code} Link to comment Share on other sites More sharing options...
Sumit Khunger Posted September 17, 2019 Share Posted September 17, 2019 Can you tell me how to get default weight unit and dimensions info using api or by any other way?? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now