Hide Variant Images

Highlighted
Excursionist
59 1 8

Good Moorning Guys,

Sorry to bother,I'm sure there's a way and solution,but i couldn't find both yet.

I had this product with a lot of variants,and it's really annoyng,all pictures of them appear in the product image gallery.

You could see it,right here:

https://9s2a0uwnjnwc86u6-5087789091.shopifypreview.com/products_preview?preview_key=dc2554ee02fd88ae...

 

Theme is Minimal One.

 

What can i do,to show the product color,only when we choose that one in the color box?Thank you so much!

Sofia

 

Highlighted

One way to do it would just hide the images with css.

 

add this to the bottom of your scss or css asset file.

ul#ProductThumbs {
    display: none;
}
We work on Shopify stores to improve, maintain, and build functionality across all store types.
- Reach Out To Us! | hello@storemedics.com
- Visit Our Site! | https://www.storemedics.com

If we helped, leave a Like / Accept Solution
0 Likes
Highlighted
Excursionist
59 1 8

It works!

But the other product thumbnails desapear :/

There's a way to just hide the variant pics?

Thank you so much,

Sofia

Highlighted

It is possible, but is a little bit complicated to set up.

 

The way we have done this in the past is you need to identify the images that need to stay and images that are variants. This can be done in the image alt fields. If you add text there (for example 'variant') then you can write in the liquid code to not display those images with that 'variant' alt tag.

 

something like this:

 

{% unless image.alt contains 'variant' %}
  [IMAGE DATA]
{% endunless %}

 

 

An alternative way to do this is to use the 'image.attached_to_variant' object. Thought this up while writing this, so haven't tested it, but in theory you could use this to identify if it is used on a variant and not have to use the alt field with the 'variant' tag.

more info: https://help.shopify.com/en/themes/liquid/objects/image#image-attached_to_variant

We work on Shopify stores to improve, maintain, and build functionality across all store types.
- Reach Out To Us! | hello@storemedics.com
- Visit Our Site! | https://www.storemedics.com

If we helped, leave a Like / Accept Solution
0 Likes
Highlighted
Shopify Staff
Shopify Staff
676 63 88

Hello, @sofcastro.

 

Elias here with Shopify Support. Thank you for reaching out.

 

There is a solution for this, which involves hiding the variant thumbnails and having the product image change based on the selected variant. 

 

The first part is to customize your theme so that your products will show the featured image until a variant is selected. This is something you can try doing on your end and save some design minutes. If you have limited knowledge with HTML, CSS, Javascript, and Liquid; our Theme Support team will be able to help with this. This will be free of charge as part of the 60 minutes of design time that is included with your subscription.

 

The next step will be hiding the variant thumbnails, which I can send up to our Theme Support team. I have already located your store and I can update you with a support ticket. Before I send up the request, could you confirm if you’d like me to send one or both requests?

Elias | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
Excursionist
59 1 8

Thank you so much for the assistance!

And to all the guys in here. Everything i do,just totally don't work,so maybe i'm doing something wrong.

I'll request both requests,for sure!

Sofia

0 Likes
Highlighted
Shopify Staff
Shopify Staff
676 63 88

Hey, @sofcastro.

 

Elias here with Shopify Support again. Thank you for confirming. 

 

I’ve sent you an authentication email with ticket number (#14893726). Kindly check your account owner’s email and send me a reply. This way, I’ll be able to forward the request to our Theme Support team right away.

 

All the best,

Elias

Elias | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
Excursionist
59 1 8

I receive the email and the Ticket number!

I'll wait for the Shopify team feedback.

Thanks in advance Elias,

Sofia

0 Likes
Highlighted
Tourist
5 0 3

Hi, I am trying to hide my variant images from the product pages and still have images that are not variants show up. How would I use this object "image.attached_to_variant" and in what template would I drop it achieve this. You had started talking about it and it sounds like a great way to achieve my goal. But, I have never used liquid/shopify so am lost. Thank you so much.

notamartha
Highlighted
Excursionist
59 1 8
All experts can’t help me ,so i give up. Shopify assistance says that i need an expert, and i even apenas some money ,and they don’t fix me the problem.
0 Likes