Skip to main content
Solved

Klaviyo / Shopify Order Confirmation: Display Variant Image

  • December 19, 2022
  • 4 replies
  • 1269 views

Forum|alt.badge.img+2

hi, We are using the order confirmation flow. We are having issue on images upon receiving the email.

when the customer buys the mini it’s showing the full size bottle instead of the mini. How can we display the correct image when the customer receives the email confirmation. I used the template and did not change anything. 

Best answer by Dov

Hi @Claude,

Thanks for sharing this with us.

It sounds like your template may not be displaying the variant image for the product. If that is indeed the case, replace the following placeholder in the template: {{ item.product.images.0.src }} with this: {% if item.product.variant.images.0.src %}{{item.product.variant.images.0.src}}{%else%}{{item.product.images.0.src|missing_product_image}}{%endif%} . Using this conditional statement will allow the variant image to be displayed.

I’ll show you where to make this change in both the “classic” and “new” Klaviyo editors:

Updating the placeholder in the “classic” editor
 

 

Updating the placeholder in the “new” editor

 

I hope that resolves the issue.

View original
Did this topic or the replies in the thread help you find an answer to your question?

4 replies

Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • Answer
  • December 19, 2022

Hi @Claude,

Thanks for sharing this with us.

It sounds like your template may not be displaying the variant image for the product. If that is indeed the case, replace the following placeholder in the template: {{ item.product.images.0.src }} with this: {% if item.product.variant.images.0.src %}{{item.product.variant.images.0.src}}{%else%}{{item.product.images.0.src|missing_product_image}}{%endif%} . Using this conditional statement will allow the variant image to be displayed.

I’ll show you where to make this change in both the “classic” and “new” Klaviyo editors:

Updating the placeholder in the “classic” editor
 

 

Updating the placeholder in the “new” editor

 

I hope that resolves the issue.


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 1 reply
  • December 19, 2022

Hi Dov!! thank you so much for the quick solution, yes you are indeed correct I’ve tried the code you’ve given its now displaying the variant image.  😀

 

Can i also ask about 3 more issue:

1. displaying the customer’s selected currency? cause now its showing our default currency is which is SGD. is there a way to show what the customer paid in their selected currency.

  1. can we also remove the <br> from the product title. (from the photo encirled in red)
  1. lastly can we also show the variant name and sku. (from the photo boxed in violet)

Please check photo for reference.

Thank you! 

 

 


Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • December 21, 2022

Hi @Claude,

I would appreciate if you could start a separate thread on this topic so we could keep this one on topic. Happy to help address those questions in that thread.

Thanks for being a community member.


Forum|alt.badge.img
  • Contributor I
  • 1 reply
  • September 29, 2023

Hi, 

I have tried the same way but still variant image is not visible.

  1. By first method:-- 
  2. By the second Method, adding code to get variant Image

    Kindly help me to resolve this, as I tried all the possible ways.

Thanks in advance!