Skip to content

How to change store based on postcode?

I have a Magento site with several stores defined. They all have essentially the same content, the reason for having different stores is so I can have different email addresses and payment accounts, so the orders can be routed to the different stores/branches. The destination store is determined by the postcode/zipcode of the customer, so you have to wait until that is entered in the checkout.
I’ve tested as many events/observers as I can find, but none of them seem to fire between the
two pages of checkout (after the address is saved in page 1 of the checkout). I guess this is because the checkout is a javscript based system? Is there an even that is fired during this process that can check the postcode and change store accordingly?
Or failing that, how can I accomplish this within the javascript checkout system?