Free Shipping Image Overlay

Highlighted
Tourist
19 0 2

Hello,

I'm looking to add a "Free Shipping" overlay into the top left corner of all of our products that are over $100 or weigh 0lbs. We already have the code in place to add "Free Shipping" text to products that match this criteria. I'm looking for a way to dynamically add an overlay using the same method. 

Here's the code I'm using to add "free shipping" text to the product pages (added to product.liquid around line 31):

{% assign free_shipping = false %}
{% for variant in product.variants %}
{% if variant.weight == 0 or variant.price > 10000 %}
   {% assign free_shipping = true %}
{% endif %}
{% endfor %}

{% if free_shipping %}
   <strong>FREE SHIPPING</strong>
{% endif %}

Any ideas on how to get "free shipping" to overlay on product images, as well as the product images in the collections?

Thanks,

Matt

0 Likes
Highlighted
New Member
5 0 0

Hey there did you find a solution to this?

0 Likes