最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Multiple Images for separate Material and Color Variants Dawn 15.0.0 - Stack Overflow

programmeradmin2浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论