I want to print the order tags in one line instead of list… can someone please help me send the template for that?
I tried everything in the post below but nothing solved the issue…
I am using Zebra gx 420d Printer to print labels but its not giving me result properly and i can only use text printer type print!
function toList(json)
{
var jsonObj = JSON.parse(json);
var r = '';
for (var i = 0; i < jsonObj.length; i++)
{
if (i == jsonObj.length -1)
{
r = r + jsonObj[i].TV;
}
else
{
r = r + jsonObj[i].TV + ', ';
}
}
return r;
}
Place {CALL:orderTags.toList('{ORDER TAG JSON}')} in your printer template where you want to show the list.
Like this:
[ORDERS]
<J00>{QUANTITY} {NAME}| L. [=F(TN('{TOTAL AMOUNT}'))]
<J00>{CALL:orderTags.toList('{ORDER TAG JSON}')}
1 Bacon Cheeseburger L. 265.00
Medium, Cheddar, Tomato, Onion, Pickle, Side Salad, Mustard, Ketchup
Hi @Memo, Thanks a lot
I tried adding the script but it still gives me a list instead of one line… can you please check if i am still missing any part?
Thanks a lot
<EB>
[LAYOUT]
<div style="font-weight:normal;text-align:left;font-size:10px">
<L22> {TICKET TYPE}
<L00> Date:{TICKET DATE}| Time:{TIME}| Ticket# {TICKET NO}
<L00> {ENTITIES}
<F>-
{ORDERS}
[ORDERS]
<J00>{QUANTITY} {NAME}| L. [=F(TN('{TOTAL AMOUNT}'))]
<J00>{CALL:orderTags.toList('{ORDER TAG JSON}')}
{ORDER TAGS}
{ORDER TAG NAME},
<C22> ({ORDER INDEX}/{INDEX TOTAL})
<L00>
[ORDER TAGS]
-- Format for order tags
<L00> * {ORDER TAG NAME}[ENTITIES:Customer]
[ENTITIES:Customer]
-- Customer entity format
<L00>{ENTITY DATA:Name} | {ENTITY NAME:Customer} | {ENTITY DATA:Address}
I should be able to do that. Let me download anydesk first, I’ve never used it. I’m in the middle of some coding right now so it may be a bit. I’ll send you a message when I have a free moment.