Last active
May 28, 2020 03:07
-
-
Save baorv/6f97240b782772d7d95f7f3a38b189f0 to your computer and use it in GitHub Desktop.
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 totalRemoveItemPrice = 0 %} | |
{% assign removeItems = "" %} | |
{% for refundItem in order.refunds %} | |
{% for refundLineItem in refundItem.refund_line_items %} | |
{% assign totalRemoveItemPrice = totalRemoveItemPrice | plus: refundLineItem.subtotal %} | |
{% assign removeItems = removeItems | append: refundLineItem.line_item_id | append: ", " %} | |
{% endfor %} | |
{% endfor %} | |
{% for item in order.line_items %} | |
{% if removeItems contains item.id %} | |
{% continue %} | |
{% else %} | |
{% endfor %} | |
{{ order.subtotal_price | minus: totalRemoveItemPrice | money: order.currency }} | |
{{ order.total_price | minus: totalRemoveItemPrice | money: order.currency }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment