Show Free Shipping on Product Page Based on Product Price

imz3r0c00l
Tourist
10 0 4

Hello,

On the product page, I want to show that a product qualifies for free shipping based on it's price. I've set the free shipping rate in Shopify for orders over $110.00. - works great.

Some products will automatically qualify since they are priced at over $110.00. 

I've got this partially working. The code works when the default/initially selected variant is over $110.00. If I select another variant that is less than $110.00 the message does not update and it's because of do not have code in here to detect the updated variant as selected. 

{% if current_variant.price > 11000 %}              
  <p style="color:green;">This product qualifies for free shipping!</p>            
  {% else %}
   <p style="color:green;">America Rocks!</p>
{% endif %}

Any idea on how i can bind this so that when the customer selects a variant that has a price of less than $110.00, the message updates and vise versa.

Thanks,

Patrick

 

 

0 Likes
JHKCreate
Shopify Partner
1977 319 421

Hi @imz3r0c00l 

There a few ways to do this, you either find the variant selection event in your theme.js and you add this event switch to the initial variant change even. Or you create a JS/jquery script inside the product-template to detect a certain click or dropdown change to update this. 

Cheers!

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help: contact@jhkcreate.com
0 Likes