How to make Coupon Item change total to **COUPON**

OK I found it… give me few more minutes to study it.

EDIT: Ok it is setting Calculate price to False. So you will not be able to read {PRICE} this is why [ORDERS:Free] showed nothing when encapsulated in [] Let me see if I can figure something out for you.

[ORDERS:Free] is the right syntax btw.

1 Like

Just to test it try this

[ORDERS:Free]      
-- Format for coupon redeemed orders      
- {NAME}|{QUANTITY} | FREE

It should list it… just wont list the price. Unless it is resetting it to nothing on close.

1 Like

OHHH NOOO, You did it. :smiley: So cool!!! Thank you so much kendash.

Oh, but it not show the item price. Can we make the item price shown in bill?

Probably not… maybe it is tricky because the action sets {PRICE} to Calculate Price = False let me look at it some more.

Try

- {NAME}|{QUANTITY} | [=F(TN('{LINE AMOUNT}'),'#,##0')] | FREE

I do not think it will work though.

The line disappeared when I tried above code.

Yeah that was wrong… that was for items total. which is also 0

I dont think we can put the price there unless we could call the menu item price directly which there is not a tag for unless its just not documented

LONG SHOT but try

- {NAME}|{QUANTITY}|[=F(TN('{MENU ITEM PRICE}'),'#,##0')]| FREE

yeah, that sounds tricky though. I wonder if SambaPOS has that kind of code avaiable.

Edit: above code not work

Yeah there is not a way to pull that price unless @emre gave us a way to pull the menu items price.

At least you got the item listed now though :stuck_out_tongue:

You can experiment and see if there is a hidden tag… look through some actions etc and try some things

EVERYTHING would stay the same except you would insert [=F(TN('{MENU ITEM PRICE}'),'#,##0')] and replace {MENU ITEM PRICE} with the possible hidden tags your trying

1 Like

You’re right, I’m still so happy with the result. Thank you so much kendash. You help me alot. I’ll be back and report if can find out anything that works.

1 Like

Hey if anything this kind of taught you about States… States can do so many things.

Ha ha, right. I now start understand why things like [ORDERS:Gift], [ORDERS:Void] stuff show up here and there, they are states, correct? :smiley:

Edit: so cool, I actually learns alot here today.

Correct… :Void is the State of [ORDERS].

So if you change an Order State in a rule somewhere… you can access that state with Printer Tags using [ORDERS:State]

Can also access it in Rules as a constraint for example… if you want an action to fire ONLY if the state of an order is something specific like Void or Refund

If accessed in rules it would look like {ORDER STATE:State}

1 Like

I edited the code to:

[ORDERS:Free]      
-- Format for coupon redeemed orders      
<J00>- {NAME}|{QUANTITY} | COUPON | COUPON

I got what I wanted without item price atm. :smiley:

1 Like

Hey at least it is somewhat consistent with your design flow. It may not put a number there for now but it keeps the ticket neatly justified.

Although is it always the same item?

If so just do

  • {NAME}|{QUANTITY}|9,000| FREE

Hey, that’s not a bad idea if we run Coupon code for only 1 item each times.

Action should not set {PRICE} to null, should set calculate price to false instead. So {PRICE} tag should display price. Is it the action coming from tutorial?

Sorry bad wording I will correct it. Was late last night was getting tired. Did not mean Null as a literal state meant it as sets it to not calculate. Just bad English slang description. Its fixed :stuck_out_tongue:

Yes it was from tutorial. Not really sure why, but if he inserts an expression to format {PRICE} it will not show the line at all. So [ORDERS:Free] was correct but for some reason it will not show {PRICE} if formatted by an expression. The odd thing is it was not showing any part of - {NAME}|{QUANTITY}|[=F(TN('{PRICE}'),'#,##0')]| FREE even though it was ONLY {PRICE} in the expression.

I would think it would have shown {NAME} {QUANTITY and FREE but it skipped the entire line when you inserted the expression with {PRICE}

Is this behavior a bug? [ORDERS:Free] worked with - {NAME}|{QUANTITY}| FREE but not with

- {NAME}|{QUANTITY}|[=F(TN('{PRICE}'),'#,##0')]| FREE

Maybe it goes without saying, but I have noticed strange behavior (non-printing lines) when using expressions and when it is not prefixed by a format such as <J00>, so please ensure you have it, as such:

<J00> - {NAME}|{QUANTITY}|[=F(TN('{PRICE}'),'#,##0')]| FREE

Strange but true.

3 Likes

Your right we should try that. Was late and I wasn’t even thinking about the format tags.

I’ll give it another try when I get back to work.