Skip to content

Instantly share code, notes, and snippets.

@jimmijazz
Created October 24, 2019 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmijazz/fcfb95944cac4fbd5e2c11c2539c0a9f to your computer and use it in GitHub Desktop.
Save jimmijazz/fcfb95944cac4fbd5e2c11c2539c0a9f to your computer and use it in GitHub Desktop.
Add a messag to product page based on cart value
{% assign shipping_threshold = 15000 %} <!-- this is in cents. 15000 = $150-->
{% assign current_cart = shipping_threshold | minus: cart.total_price %}
{{ current_cart }}
{{ cart.total_price }}
{% if cart.total_price < shipping_threshold %}
<p>Add {{ current_cart | money }} to your cart for free express shiping </p>
{% else %}
<p>Qualify for free express shipping!</p>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment