Is there an option to change store in php depending on some criteria and reload a whole page?
So for example when php detects the language is set as italian it changes the store from store1 to store2 ?
So a php code if language=italian change current store to store2 ?
Any idea?
The browser's configured language is available somewhere in PHP (getenv('HTTP_ACCEPT_LANGUAGE'), I think). I know that osCommerce attempts to use it to select the store language to be used. However, many people apparently just leave their browser messages etc. in English, so it doesn't do much good. Once you have the language, you could check if you have a store for that language, and redirect to that store with PHP header("Location: ......");. Just be sure the code is before any output to the browser, or you'll get a "Headers already sent" error message.
Is more safe to get the language by IP address
Opencart Developer - For custom work and support contact @ webcorvo@gmail.com
And why exactly do you want this? I can't seem to imagine any decent reason myself.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Who is online
Users browsing this forum: No registered users and 270 guests