Use tags to define trust badges on product page

Hello all,

I’m looking for a solution to use product tags to automatically display trust badges.

For example, if my product has a Women-owned tag, then it would automatically display the related trust badge, in the product screen.

I do know that I can define images for trust badges and insert them with a custom liquid block via metafields (see example below).

{{ product.metafields.my_fields.namespace_key | img_tag }}

However, I would love to have something a bit more automated that allows me to only upload the image once and have it displayed for any product it applies to. Then I don’t have to manually upload images with each new product we add.

I’m using the Showcase them in the case that changes anything.

Any suggestions are welcome! Thank you in advance!

Hello, Charlooney

since you want the images to be associated with tags, you could do the following:

  1. set a naming convention for the tags that will define having a badge, such as ‘trust_women-owned_trust’, ‘trust_store-owned_trust’
  2. do a verification for these tags, and
    1. if they exist, a image carefuly named after them and uploaded into the store content (women-owned.jpg or such) will be shown
    2. if they don’t, nothing happens, no harm done

Thanks @Uhrick !

I would love to use existing tags, as we already have hundreds of products uploaded and tagged – my goal is to reduce the amount of work that is duplicated.

Would something like this work?

{% for tag in product.tags %}
  {% if tag contains 'your_specific_value' %}
    
    
      
    
    {% break %}
  {% endif %}
{% endfor %}

Thanks so much!

hi, Charlooney. Yes, it should work