I need to display a custom gift card image based on the variant selected. I need to display this on the (1) ‘Gift card created’ email notification and the (2) gift_card.liquid page. Currently, I can not find a method of passing/reading the information in liquid. Please help… this seems like a logical requirement. Note: some variants have a different initial price, so I can not use this information as a reference.
You can refer https://shopify.dev/api/liquid/objects/gift-card#gift_card-product
You can try with: gift_card.product and then get product variants with product.variants, ex: https://shopify.dev/api/liquid/objects/product#product-variants
Hope it helps!
Nope it does not
Did you ever get a way to do this ?
I see I’m late, but if anyone’s still looking for a way to do this here’s how I did it.
I added the variant image as a line item property (_variantImage so that customers don’t see it) and then read it from gift_card.properties
Hey @TanjaCodi ,
what did you placed in the all_products[‘gift-card’] ? And I think this is static solution. Plus in loop you are checking condition based on price it can happen that one or more product’s variant has some price. What will happen then?
Please let me know if I have misunderstood this or is there any other jack to make this work as I am desperately looking for.
Thanks.