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

Yeah, that’s exactly what I mean kendash. :sunny:

Ok one quick thing. The action you used to update Gift State to Free. Can you show that action expanded so I can see how you did it?

Did you use Update Order State action… or did you use Update order Gift State action that was already premade?

I used the script premade in forum.

Ah, Free is my replacement word for Gift, I changed it in template only. Gift state should be the same everywhere.

I think this should work.

Add this above your [ORDERS:Gift] portion of the template:

[ORDERS:Free]

-- Format for coupon redeemed orders
      
- {NAME}|{QUANTITY} | [=F(TN('{PRICE}'),'#,##0')] | FREE

Basically you told the state to be Free vs Gift. So [ORDERS:Free] should work.

If you look at the Action used in the Gift rule it will say Gift in the spot where you typed Free… however the actual status is GStatus… State is Free. [ORDERS:X] The X = State Name

So when it sees an order with the State of Free it will print the format you defined for [ORDERS:Free]

It shown nothing after insert the code:

I think I dont know what the state of my Coupon is. :frowning:

Ok hang on. we are getting somewhere It did not show because it was wrapped as expression and it found no value so it didnt print it.

So [ORDERS:Free] did work we just need to fix the other issue.

I need to look at that tutorial I think it is modifying price… so after using coupon {PRICE} probably has no value.

Can you find the rule that executes the coupon on the item? Expand it and expand the action. Action should be Update Order State or something similar

EDIT: Nevermind I just installed it on mine.

Try this [ORDERS:Coupon State] instead of [ORDERS:Free]

Okay I’m trying now.

[ORDERS:Coupon State]

– Format for coupon redeemed orders

  • {NAME}|{QUANTITY} | [=F(TN(‘{PRICE}’),‘#,##0’)] | FREE

It’s Printed, but the word Free not shown, it appear to be like normal, let’s me take a photo.

The strangest part is when I change [ORDERS:Coupon State] back to [ORDERS:Free]… the redeemed product dis-appeared.

ORDERS:Free must not exist. I am close give me little more.

EDIT: There are a lot of order states being changed including some on ticket close. I need to find the right state for you to call.

Give me some more time I am learning how the coupon system was setup. Did you modify it any? It looks like it was designed for coffee

The default setup is for Coffee. All I need to do to change it is:

  1. Go to Product List, create “VIT LON Cai Coupon”, with Tag “VIT LON Cai”

the script will auto read to Item Tag and put it up to be the redeemed item.

Try [ORDERS:Coupon Paid]

It not work. The way the scrip handle the state of the code is in the code’s entity. Wait, I’ll make a screencap.

Edit: My mistake, in entity, I can only find the Redeemed state as Yes, In Ticket, No…

I installed it… im looking at it now. You can change entity states without creating an actual state btw. It is changing order state multiple times through the transaction. I need to capture the state it is reading when you print bill.

EDIT: That would be the wrong state however I realize this now that was for a coupon thats paid.

It is changing state to say Free. Did you add Free somewhere?

No, I don’t touch the default settings anywhere, the Free word only added into template by me, not anywhere else. Maybe, that explains why when we put [ORDERS:Free], the coupon line disappeared.

I am talking about on the Ticket Screen it says Free. Maybe I have missed it but I cannot find where it changed the state to free. Im still looking