Created
June 2, 2020 07:21
-
-
Save baorv/9f86e186cf645f7c795dddcfd3119860 to your computer and use it in GitHub Desktop.
discount per item
This file contains 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
{% assign discountAllocationAmount = 0 %} | |
{% for discountAllocation in item.discount_allocations %} | |
{% assign discountAllocationAmount = discountAllocationAmount | minus: item.amount %} | |
{% assign discountAllocationAmount = discountAllocationAmount | divide_by: item.quantity %} | |
{% endfor %} | |
{{ item.price | minus: discountAllocationAmount }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment