Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zakhardage/bccf6fe9bab52e636c3ec76112c3889a to your computer and use it in GitHub Desktop.
Save zakhardage/bccf6fe9bab52e636c3ec76112c3889a to your computer and use it in GitHub Desktop.
automatically apply price-based discount in Shopify
{% if cart.total_price > settings.cart-discount-threshold %}{% assign threshold = true %}{% endif %}
<form action="/cart{% if threshold %}/?discount=[discountcode]{% endif %}" method="post">
@shkoober
Copy link

can this be applied per product? or only for overall cart total?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment