DISCOUNT - Any Item - Ask Custom Amount


#84

How do you have it set to calculate quantity x price x ?


#85

I think that why. I don’t have system in front of me right now I will check that tomorrow.


#86

Its because {ORDER TAG TOTAL:X} is pulling value from ORDER TAG it does not see any calculations. So it is working as intended your calculations are throwing it off.


#87

I don’t think I change formular. I just change how to read input both $ and %


#88

Reading the input is the same thing… because that is whats setting your price… but order tag stays same. Order tag is still $5 your just telling it how to display the total differently. but {ORDER TAG TOTAL:X} is reading the Order Tag value not your amount you told it to show.


#89

Thank you, I think that is the problem


#90

I think you can still get it to work you just need to rethink your approach. It will technically be a different type of discount than this tutorial…


#91

I think so, sambapos is flexible enough to do anything.
Good night


#92

Here is my rule for discount amount:


Tag Value: *** Discount $[=’[:CommandValue]’.substr(1,-1)] ***
Tag Price: [=-1*TN(’[:CommandValue]’.substr(1,-1))]

It doesn’t have Quantity, just Order Tag Price. SampaPOS automatically calculate quantity.


#93

EDIT: Hmm I am not sure how to get it working for you. Let me look into it more.

{ORDER TAG TOTAL:X} is working I am able to use it and it works just fine. But something with how its calculating the {PRICE} when qty key is used and the way your using the tags is causing it not to add up the calculations for qty of items.

It is designed to be a static amount… your able to get it to somewhat calculate on qty level but technically its still just a static amount.


#94

Sorry, I still don’t quite get it.

Order Tag Name: Discount
Order tag list:

I use {ORDER TAG TOTAL:Discount} to read total discount.


#95

Yes but Price will be what you input… you input 5 Price will be 5… {ORDER TAG TOTAL:X} is reading total of each items order tag… you only have 1 order tag… its price is what you entered for Command Value…

For {ORDER TAG TOTAL:X} to show your method you would have to have multiple order tags for that 1 item based off how many qty.

So if you had 3x item and you wanted $1.00 off each item… you would need to apply 3 order tags each for $1.00 Then it can add up the QTY of Order tags and the PRice

Your using 1 order tag and then using Value to show combined price


#96

Let forget about Automation,
If I use regular order tag for discount $1 and order line have 2x items. {ORDER TAG TOTAL:X} still read $1.
But the total bill still show the price (after discount $2) correctly.

I think {ORDER TAG TOTAL:X} still need to be fixed though.


#97

Yes it seems ignores order quantity. Fixed thanks.


#98

Yes I did not mean we did not need to fix it. I was just trying to understand what it was doing.

Awesome!


#99

@kendash @QMcKay and others

Thank you for your help to get discounts working.

Best Regards,


#100

Actually, I don’t need multiple order tags now since we have {ORDER TAG NOTE}. So, want back to original one order tag list and add {ORDER TAG NOTE} to printer template.


#101

@kendash now we can use a keypad popup instead of the full keyboard popping up to enter discount amount, what do i need to change and what expression do i need?

I managed to get keypad to popup instead of full keyboard but i cant get the expression right so that i can enter a value, it either lets me enter 1 or 0 no other numbers work and i cant do double digits, it literally is 1 or 0

EDIT: I know where to edit I just dont know what to put in the expression to enable you to type values between 1-100 for percentage off AND to type any value for Amount off in respective rules


#102

@kendash @emre ive worked out how to get the keypad to appear and enter digits 1-9 but it will only let me enter a single digit either 1,2,3,4,5,6,7,8 or 9. what do i need to do to my expression to let it enter 2 digits so i can discount more than 9, eg 35, 28, 68, any two digit combination. below is my expression that is just letting me enter 1 digit, i thougtht by using [1-99] it wouid let me enter any number between 1-99 and not just 1 single digit?

[?Enter Discount Percentage;([0-99]);;N]


#103

Try:

[?Enter Discount Percentage;;;ON]

Or

[?Enter Discount Percentage;\d{2};;ON]