How do I hide variant images when they are out of stock?

hankblip
Excursionist
23 0 6

How do I hide variant images when they are out of stock?

I have hidden variants from the dropdown when they are out of stock, but how do I hide images that are assigned to those variants?

Thanks in advance!

Replies 7 (7)

Michal17
Shopify Partner
835 73 175

Hi @hankblip 
Sincerely hope you're having a great day!
I've read your problem and, before providing a solution, would like to analyze your website. Then, I will provide a solution to you up here - on the forum.
Could you share your website URL? And if your website is password protected, then also provide a password?

hankblip
Excursionist
23 0 6

Sending you a PM now

Michal17
Shopify Partner
835 73 175

Hi @hankblip 

Hope you're having a great day!

I saw your website. Could you show me a product that has the problem you are trying to solve?

hankblip
Excursionist
23 0 6

Hi @Michal17, here is a link to an example: ESP Undertaker

you will see that the variants that are out of stock do not show in the variant list, but then the images of those variants still reflect. How can I hide those images that are attached/assigned to the variants that are now out of stock?

Let me know if that makes sense.

hankblip
Excursionist
23 0 6

@Michal17 any updates?

Michal17
Shopify Partner
835 73 175

Hi @hankblip 

Hope you're having a great day!

scrnli_22_05_2021_15-34-42.png

By following the steps above, could you share the content of sections/product-template.liquid file?

David_Weru
Shopify Partner
177 16 43