Hi everyone, I’m trying to set up an internal email that summarizes our daily draft orders, including their total.
I’ve been working with the code below, but I keep running into an error saying “order_total” is invalid. Replace this variable.
Can anyone assist by providing the correct code to achieve this? It’s been a bit frustrating, and I’d really appreciate any help. Here’s what I’ve been using:
This is a summary of Today’s Draft Orders:
{% assign totalDraft = 0 %}
{% for draftOrder in getDraftOrderData %}
Draft Order #: {{ draftOrder.id }}, Status: {{ draftOrder.status }}, Draft Total: {{ draftOrder.order_total }}
{% assign totalDraft = totalDraft | plus: draftOrder.order_total %}
{% endfor %}
Total of All Drafts: {{ totalDraft }}
Richard