TICKET: ORDER TAG GROUP LIST showing prefix list name on ticket

Hi again:

Just today I’ve found that I can put all the tags inside a single button using the order tags prefixes.

Works great and its a powerfull feature.

Now my problem its with the kitchen ticket template, I have all the “CHEESE” tags under the prefix “CHEESE”, all the “VEGGIES” under “GREEN”… now when I print a ticket looks like:

░░░░░░░░░░░░░░░ B U R G E R ░░░░░░░░░░░░░░

  • 1 110grs CUSTOM BURGER

    CHEESE * Provolone
    CHEESE * Mozzarella
    GREEN lettuce
    GREEN onion

I need to remove the “CHEESE” and “GREEN” words from the ticket but I can not figure how to do it :confused:

I could be wrong but I don’t think you can remove prefix. Why you use prefix anyway? You should create Cheese, Green order tag separately.

BTW, you can remove GREEN and CHEESE by script in V5 by passing order tag to script to process it.

can u explain a little bit more how to do this please.

Automation>Scripts contains a list of javascript scripts which you can call from many places across samba.

Inside the script you can create a function and then call this function from within the ticket template using a command such as {CALL:myScript.myReplaceFuntion(’{ORDER TAG}’)}

You can use pretty standard javascript to actually do the replacement, so you can look on general javascript forums to work out how you can take an input string and remove the words you are looking to remove. There will be many ways to achieve this in javascript including using regex, but I am not sure what would be the best and most efficient method.

1 Like