Liquid, JavaScript, Themes
Hey,
I do have linked my product pictures to my variants with alt-texts. That works fine. How ever I now have 2 Options, as you can see in the link: https://indieway.de/products/whey-protein-concentrate?variant=42090086760518
1. "Dein Geschmack"
2. "Wähle die Menge"
When I do want to have the strawberry pictures only show when strawberry geschmack is chosen I add "#Dein Geschmack_Strawberry" as an alt text and it works.
But now I want to add an Product Image that should only be displayed when
1. Dein Geschmack:Strawberry
AND
2. Wähle die Menge:2 Beutel | Du sparst 5€
According to the syntax I made "#Dein Geschmack_Strawberry, #Wähle die Menge_2 Beutel | Du sparst 5€"
as an alt text, but it did not work. Have you any tipps why?
(Using Impact Shopify Theme)
I am german btw lol
Don't think that's the way Shopify handles the variant options using the alt text syntax - you used (#Dein Geschmack_Strawberry, #Wähle die Menge_2 Beutel | Du sparst 5€) which may possibly be interpreted incorrectly because of potential conflicts with things like special chars, commas, pipes (|), and spaces within the alt text string. Shopify’s variant matching logic does not like things like complex strings, especially when there are multiple options combined. You need to make sure that the alt text is structured in a way that Shopify's internal matching system can parse. If you want to maintain your naming convention (e.g., "2 Beutel | Du sparst 5€"), try using two separate alt texts on the same image to ensure that Shopify picks up both conditions...
Mit dem Lernpfad der Shopify Academy und dem Verified Skills-Badge Expanding Your Sho...
By Shopify Feb 7, 2025Den Verkauf im Großhandel steigern: In der Shopify Academy lernst du, wie das geht, zum...
By Shopify Feb 3, 2025Teil 2 - Wie die Prinzipien des UX-Designs dir dabei helfen können einen großartigen Shop ...
By Kai Sep 16, 2024