jhdesign Posted January 27, 2006 Posted January 27, 2006 Wondering if anyone know's a fix for this: I'd like the currency to be switched automatically throughout the site based on Users Country. IE if Canada set to CAD$ if not (rest of world) show USD$. Any help is apprciated. Jacob
Guest Posted January 27, 2006 Posted January 27, 2006 you need to resolve the session's ip to the country and then switch to the appropriate currency. There is a contribution that records ip for an order. You could perhaps leverage some code for the ip details and then setup the application_top.php to switch the currency of the store. I assume you already tried the configuration settings for the currency/language switching.
jhdesign Posted January 29, 2006 Author Posted January 29, 2006 you need to resolve the session's ip to the country and then switch to the appropriate currency. There is a contribution that records ip for an order. You could perhaps leverage some code for the ip details and then setup the application_top.php to switch the currency of the store. I assume you already tried the configuration settings for the currency/language switching. I was thinking about checking the COUNTRY in the user profile and adjust accordingly, but not sure how to go about that, my php/mysql experience is not very strong. Thanks, Jacob
wheeloftime Posted January 30, 2006 Posted January 30, 2006 I was thinking about checking the COUNTRY in the user profile and adjust accordingly, but not sure how to go about that, my php/mysql experience is not very strong. Thanks, Jacob That would only work for registered customers ! As mark describes would be the way to achieve it for all.
jhdesign Posted January 31, 2006 Author Posted January 31, 2006 Thanks for the replies. I need some code help though: I'd like to FORCE currency to switch when on category id #2 (instead of location as discussed above) Any help is appreciated. Jacob
jhdesign Posted January 31, 2006 Author Posted January 31, 2006 Ran some tests and got it to work with this code: if ($cPath==23) { $currency="CAD"; } else { $currency="USD"; } Jacob
Recommended Posts
Archived
This topic is now archived and is closed to further replies.