How can I get the [@total_items@] and [@shipping_weight_total@] into a report export at order level (one line per order)?
Order ID*, Ship Address.... Total Items, Total Ship Weight
Sometimes the more advanced B@SE tags work ok in exports. No guarantee, but try something like this:
[%show_order id:'[@order_id@]';%][%param *body%][@total_items@],[@shipping_weight_total@][%/param%][%/show_order%]
Well that didn't work exactly but it got me thinking...
When I put that statement into the FILE BODY - Body section ,it still gave one line per item, not order.
I was playing around with the [param *body] part and discovered the trick is to put the statement into FILE BODY - Header section as ;
[%show_order id:'[@order_id@]';%][%param *header%][@total_items@],[@shipping_weight_total@][%/param%][%/show_order%]
And then it sums to order level.
Thanks so much for the lead! Happy to have cracked it.
Ah sorry I should have said which section it goes in. The order export sections have terribly confusing names!
FILE HEADER: First line of the file
FILE BODY - header: Runs once per order, before the line items
FILE BODY - body: Runs once per line item
FILE BODY - footer: Runs once per order, after the line items
FILE FOOTER: Last line of the file