I have a sandal product that I have available in 3 colors and 2 materials. So I should have 6 different variations of the same product, but I can only add one main image for each. All the tutorials I have found so far only help in the cases of one type of variant, which is usually color, but if I need to have a variant of one color that has two materials, then none of the solutions work. I asked gpt, but I couldn't find the code in the files that needed to be replaced.
I need the code to use the alt text or file name to assign the photos to the right variant in this format:
alt text in the following format: Gender_ProductType_SKU_Material_Color_PositionNumber
Here is a link with an example, I removed the previous code I had that only worked with multiple images of each color. Basically, the material and color variants are separate objects that each have multiple instances that are related to each other. I want to also add that sometimes I might have a black slipper in leather and faux leather, but that same slipper in brown is only available in faux leather. This edge case doesn't need to have a solution, since I think I know how to fix it be default, but if there is a solution that takes this edge case into account as well, then great. Thank you!
Screenshot1