I'm selling eyewear and am currently running Magento 22.214.171.124 (still in development). Each SKU is the frame. My category hierarchy is: Men -> Eyewear -> Sunglasses Women -> Eyewear -> Sunglasses
It's possible that a frame belongs to all the above categories. For certain frames, I have photos of that frames with sunglass lenses and some with regular eyewear lenses. I want to only show the sunglass lens photos on the product page if the item was selected under the sunglass category, and only show the optical lens photos if the item was found under the eyewear category.
As an example, if the user navigates to Women -> Sunglasses and then clicks a picture of awesome-frame-1 with sunglass lenses, they'll go to http://www.myeyewearsite.com/women/sunglasses/awesome-frame1.html and I want the default product image on the product page to be a photo of awesome-frame1 with sunglass lenses, the same image they clicked on from the catalog page to get there. Conversely, if the user navigates to Women -> Eyewear and then clicks a picture of awesome-frame-1 with eyewear (non-sun) lenses, they'll go to http://www.myeyewearsite.com/women/eyewear/awesome-frame1.html and I want the default product image on the product page to be a photo of awesome-frame1 with eyewear (non-sun) lenses, the same image they clicked on from the catalog page.
If you're wondering why I don't just use a different SKU for sun vs eyewear, it's because we are working with a 3rd party that is charging us based on the number of SKUs. So, we're trying to keep them to a minimum.
Is there a way to present only a subset of product images based on its category? I've spent hours playing around in my CMS and haven't found a way to do it through there. I was unable to find an answer looking at other questions asked in this forum either, so any guidance would be appreciated.