Created
July 6, 2021 23:17
-
-
Save hayes0724/e49b5cd990fd2b9aa2a9ec182ac21d4c to your computer and use it in GitHub Desktop.
Free shipping calculator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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