Tom S. Posted May 31, 2018 Share Posted May 31, 2018 When a user goes to the store they can change the currency using this widget: How can I change it programmatically? I figured it's not a database setting as if I set the currency in one browser, it goes back to the default in a different browser. I also don't see any cookies about currency setting. Is it using $_SESSIONs? I just want to be able to manually change from the default currency if the user is from the U.K. for example. Link to comment Share on other sites More sharing options...
Solution newbie LAC Posted June 1, 2018 Solution Share Posted June 1, 2018 See template chooseCurrency {{$memberCurrency = ( ( isset( $_SESSION['currency'] ) and in_array( $_SESSION['currency'], \IPS\nexus\Money::currencies() ) ) ? $_SESSION['currency'] : \IPS\nexus\Customer::loggedIn()->defaultCurrency() );}} Tom S. and modman 2 Link to comment Share on other sites More sharing options...
Tom S. Posted June 1, 2018 Author Share Posted June 1, 2018 Just what I needed. Many thanks pal! Link to comment Share on other sites More sharing options...
modman Posted January 14, 2021 Share Posted January 14, 2021 On 5/31/2018 at 11:24 PM, Tom S. said: I just want to be able to manually change from the default currency if the user is from the U.K. for example. @Tom S. I need this too, can you submit the code? Thanks for your help. Link to comment Share on other sites More sharing options...
Daniel F Posted January 14, 2021 Share Posted January 14, 2021 30 minutes ago, modman said: @Tom S. I need this too, can you submit the code? Thanks for your help. The solution was already posted here Link to comment Share on other sites More sharing options...
modman Posted January 14, 2021 Share Posted January 14, 2021 Ok thank you really, i didn’t understand :) Link to comment Share on other sites More sharing options...
Recommended Posts