Skip to content

Instantly share code, notes, and snippets.

@hayes0724
Created July 6, 2021 23:17
Show Gist options
  • Save hayes0724/e49b5cd990fd2b9aa2a9ec182ac21d4c to your computer and use it in GitHub Desktop.
Save hayes0724/e49b5cd990fd2b9aa2a9ec182ac21d4c to your computer and use it in GitHub Desktop.
Free shipping calculator
{% liquid
assign required_amount = section.settings.free_shipping | times: 100
assign amount_needed = required_amount | minus: cart.total_price
assign percentage = required_amount | minus: cart.total_price | times: 100.0 | divided_by: required_amount | minus: 100 | abs | round | at_most: 100
%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment