Last active
June 8, 2022 21:49
-
-
Save tobiasdalhof/93bc71eb1cd431aca246217092d96d0f to your computer and use it in GitHub Desktop.
Shopify customer total spent value for all orders with status "paid", "partially_paid" and "partially_refunded" without refundend amount | ✨ Estimated delivery date & order deadline for product pages https://www.delm.io
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 total_spent = 0 %} | |
{% for order in customer.orders %} | |
{% if order.financial_status == 'paid' or order.financial_status == 'partially_paid' or order.financial_status == 'partially_refunded' %} | |
{% assign total_spent = total_spent | plus: order.total_price | minus: order.total_refunded_amount %} | |
{% endif %} | |
{% endfor %} | |
{{ total_spent | money }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment