Jump to content

Featured Replies

Posted

When a user goes to the store they can change the currency using this widget:

currencies.png.73f001d8b3fa8494af0d0a1280044105.png

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.

Solved by newbie LAC

Go to solution
  • Solution

See template chooseCurrency

{{$memberCurrency = ( ( isset( $_SESSION['currency'] ) and in_array( $_SESSION['currency'], \IPS\nexus\Money::currencies() ) ) ? $_SESSION['currency'] : \IPS\nexus\Customer::loggedIn()->defaultCurrency() );}}

 

  • Author

Just what I needed. Many thanks pal!

  • 2 years later...
 

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.

Ok thank you really, i didn’t understand :)

Recently Browsing 0

  • No registered users viewing this page.