Announcement
Collapse
No announcement yet.
Need some really basic help with template based batch reports
Collapse
X
-
The existing Template Based Batch Reports will also have some examples of gathering pretty much everything you would want from the orders.
- 1 like
-
Here is a code snippet to see the variables and values of an array:
The array for the items in an order will be in the order:items array. If you navigate to the INVC page within the admin you can use that code as an example of how the array is structured.Code:<mvt:eval expr="decodeattribute(glosub(miva_array_serialize(VARIABLE FOR ARRAY HERE), ',', '<br>'))" />
The snippet below will output the variables and values of a product within the item array.
Hopefully this helps!Code:<!-- EXAMPLE: --> <mvt:foreach iterator="order" array="admin_order:orders"> <mvt:foreach iterator="item" array="order:items"> <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:item), ',', '<br>'))" /> </mvt:foreach> </mvt:foreach>Last edited by Nick; 12-10-19, 09:32 AM.
- 1 like
Leave a comment:
-
Need some really basic help with template based batch reports
I'm trying to build a custom .csv with a batch report template. Found some help here, but I'm bad so I need more help with the template language... I can see it has a loop for orders which is perfect:
But I don't know how to then individually loop through each product and also each attribute. I want to add statements to check if product attributes contain certain words so I can enter correct words or just commas.Code:<mvt:foreach iterator="order" array="admin_order:orders"> </mvt:foreach>
Any help at all (even just links to the right docs) is appreciated!Code:<mvt:foreach iterator="???" array="???"> </mvt:foreach>
Leave a comment: