We don´t do a lot of webshops, to this challenge is not an everyday challenge for us. We have built a webshop, that sells clothing. It´s PIM based, and the variants are combined via the PIM interface. The two dimensions of variants, are "colo" and "size"
On a productpage, what is the best way to switch between the variants? Preferrably, we don´t want to reload the page everytime we select a variant, but what we want to do - is change the images and productid and url (via pushState or similar), and of course - make shure that the add to cart command is matching the selected variants at all times. And, we also want to make shure that its only possible to order products that exist. So the relationship between variants, must be updated on all times - so that if I select color "blue", and blue os only available in XS - than all other size options must vanish.
In short - on a product page - where can i get all the data on all avaible variants of the currrent product, so that i can manipulate the correct "reaction" to the visitors interactions?