Want to add shipping labels to my product page using tags. Debut Theme.

Solved
Shopify Partner
35 1 2

What I would like to do is to have above my Add to Cart button a text that displays estimated delivery times for each product. Thing is, I have over 200 products with variable shipping times. What I would like to do is to create specific tags for each delivery time and tag the products. What I'm assuming is the correct way for doing this is adding an IF statement on the product page: if tag is '10days', display '10 business day' text. I feel confortable tweaking the code, just don't know exactly where to add the code and the proper syntax.

 

Here's a picture of what I'm trying to accomplish, and this is my store.

 

WhatsApp Image 2019-12-02 at 10.16.20 PM.jpeg

 

0 Likes

Hello 

The best way to do that would be through an app! Apps are like extra features you can add to your store. In this case, here are some apps that will help you add  'Free Shipping' banner or sticker on your products: 

 

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Custom Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Digital Marketing | Site Speed Optimization | Web Development
0 Likes
Shopify Partner
35 1 2

Hi! Thanks, I'm not trying to add a badge to the image though, more try to add the label as text on the product page. I know I have to add something along this lines:

{% if product.tag contains  'sevendays' %}  
      <p>Delivered in 7 business days</p>
        {% endif %}

I don't know whether it is as simple as that, nor where exactly should I place it, but I would prefer this way than having a 3rd party app.

0 Likes

Success.

Shopify Partner
35 1 2

Ok, I managed to figure this out myself so I'll post the solution in case someone finds it helpful.

 {% for tag in product.tags %}
         	{% if tag contains '7days' %}
        		<p>Delivery in 7 days</p>
         	{% endif %}
        {% endfor %}

The only thing I was missing was the FOR statement which goes through the tags to see if it contains the tag.

0 Likes