Add specific collection image on product thumbnails

Hi,

I want to add specific collection image (like LOGO of the brand) on product thumbnails which is one of the specific collection.

  • for example, add A logo image on product B which is one of the collection A.

when the product B has the tag “sample”, it is sorted as collecion A.

I tried to put the code below.

{% if product.tags contains 'sample' %}
  
{% endif %}

It worked but I have to add the tags all time when I add new collection.

I know I can use “{{collection.image}}” instead of
but problem is one item include at least 2 collections so it may not shows the image I want to.

If someone have great idea, I would appreciate with your kindness.

Hi @bunbun ,

Is product B really in collection A, or do you just set it via the “sample” tag? And if you want to display 2 collections, what data will the other collection be set through?

I don’t understand your request, can you explain more about it.

Thank you.