I have a 2 website in 1 installation with 2 store views each. The store views are GBP and USA and the difference is just the price.
I have manage to redirect each website properly using .htaccess. The problem is that I want to redirect now each customer to proper store view according to their IP.
I know how to get the proper store view by IP so lets ignore that part.
I am looking at \Magento\Store\App\Action\Plugin\Context
where magento is doing something with a plugin. It looks promising but I still can't work out how to do it.
Any ideas?
PS: As I already explained above I know how to get the store view by IP. The part I m asking is on how to redirect the customer to the proper store view.
PS2: For the third time I ll point this: I know how to get the proper store view by IP so lets ignore that part.
People please read the question before you say this is a duplicate.
mod_geoip
and set the store id in htaccess usingSTORE_RUN_CODE
. I don't know enough about either to write a full answer