I have a product tag named NumOfItems for all of my products which has a number. This represents the number of items are in that product, i.e chicken balls will have 2 in that field for the sauce and the chicken balls.
Just wondering if I can get the sum of this field to print on the printer templates.
You can see I have the product tag with “Items”
Lets say chicken balls and Pork Curry was ordered on one order I need to print the total be 3, because chicken balls has 2 Items and Pork Curry Has 1 Item.
First of all you need to store quantities within orders. After that you can use Ticket Expressions to calculate totals. For example we can use Order State Values for that. I think this is an undocumented feature so let me explain that.
Create an action to update Order State Value. I’m using a state named as RQuantity, state is Quantity and state value will taken from Product Tag.
If you use correct calculation on template of qty X tag state value it doesn’t matter, the state is a ‘per product’ value which will be multiplied on the print…