I have an ecommerce store on woocommerce, my theme developer has recently added the ability to assign a gallery of images to product variations. This means I no longer need separate products with separate URLs for different colours, meaning I can group products into one url = much better for SEO.
My products are available in different sizes, with the large sizes costing more as they require more fabric to make. They also come in different colours but the price does not vary according to it's colour.
For example: A t-shirt, available in sizes: small (€10), Medium (€10), Large (€15), in colours red, blue and green.
So I go into the backend, create my size & colour attributes, and select "create variations from all attributes", this creates 9 variations, the 3 sizes by the 3 colours. However because the prices are different I will have to upload a gallery of images for every variation, this is not good as my page sizes will dramatically increase = not good for SEO.
So I start fiddling with the variations, I realise I can set the products that have a fixed price, by only creating the variations
"any size-blue-price=€10" loads gallery of blue t-shirts
"any size-red-price=€10" loads gallery of red t-shirts
"any size-green-price=€10" loads gallery of green t-shirts
So when a product has a fixed price it is no problem, but when the price changes for a large size then I have all sorts of problems. IT is also worth nothing that woocommerce prioritises variations depending on which one is first, for example with a t-shirt that costs more for a larger size:
"Size Large-red-price=€15" no gallery of red t-shirts
"any size-red-price=€10" gallery of red t-shirts
The gallery of red t-shirt will load for any size except large as the first variation takes priority. I need to able to load the SAME gallery of red t-shirts whenever the colour attribute "red" is clicked. An example of this working can be found on this webpage "http://svi.rosendo.pt/pro/product/test/", this is a sample page of a plugin that does what I need, however, the plugin conflicts with my theme on other issues. I need a piece of code, or a hook so that I only need to load one gallery relative to the attribute, instead of multiples of the same gallery.
Any help would be greatly appreciated as I have been stuck on this matter for awhile now trying to come up with different ways of organising variations but I can't see a logical way that it would work as the highest priority variation always conflicts in some way with the other variations, whether the price is wrong, or the images won't load.