{% spaceless %} {% set total_discount = 0 %} {% for coupon in row.coupons %} {% set total_discount = total_discount + coupon.discount %} {% endfor %} {# Tax rate #} {% if row.subtotal > 0 %} {% set tax_rate = ((row.tax) / row.subtotal)|number_format(3, '.', ',') %} {% set tax_rate = tax_rate*100 %} {% endif %} {% if row.shipping[0].carrier_method == 'Standard' %} {% set shipping_code = 'UPSG' %} {% elseif row.shipping[0].carrier_method == 'Expedited' %} {% set shipping_code = 'UPSE' %} {% elseif row.shipping[0].carrier_method == 'NextDay' %} {% set shipping_code = 'UPSO' %} {% endif %} {% endspaceless %} {# Shipping Info #}{{ row.shipping_first_name }} {{ row.shipping_last_name }} {{ row.shipping_street_line1 }} {{ row.shipping_street_line2 }} {{ row.shipping_city }} {{ row.shipping_state }} {{ row.shipping_zip }} US United States {{ row.shipping_phone_number }} {# Billing Info #}{{ row.billing_first_name }} {{ row.billing_last_name }} {{ row.billing_street_line1 }} {{ row.billing_street_line2 }} {{ row.billing_city }} {{ row.billing_state }} {{ row.billing_zip }} US United States {{ row.billing_phone_number }} {{ row.email }} {{ shipping_code }} {{ tax_rate ?: '0' }} {{ row.tax ?: '0.00' }} {{ row.shipping_rate }} {{ row.subtotal }} {{ row.total }} {{ row.items | length}} 0.00 0.00 {{ total_discount ?: '0.00' }} 0.00 {% for item in row.items %} {% spaceless %} {% set total_item_discount = 0 %} {% for coupon in row.coupons %} {% for discounted_item in coupon.discounted_items %} {% if discounted_item.variant_id == item.product_id %} {% set total_item_discount = total_item_discount + discounted_item.discount_amount %} {% endif %} {% endfor %} {% endfor %} {% endspaceless %}{{ item.sku }}|{{ item.name }} ;Sku: {{ item.sku }};Model#: {{ item.sku }}|{{ item.quantity }}|{{ item.price }}|{{ item.sku }}|{{ item.price - total_item_discount }} {% endfor %}