I'm developing an ecommerce website. Now, at the homepage, i want to put the preferred country. When the customer choose their preferred country, the list of product shown to them was from that prefered country only.
My database (products table has id, name, description, color, SKU and country_id)
Anyone has idea about this. I already check for global variable. But its like declaring in core.php or bootstrap.php. I want it to declare at my homepage when customer choose the country.
Please somebody help me. Thanks in advance ;p
If your user selects a country, store it in a session or cookie. If you want to be really efficient, you could have users select their preferred country on sign-up and store that in their profile record in the database, and set a configuration variable when they log in.