Remove Discount

I followed this tutorial here

https://kb.sambapos.com/en/4-59-applying-discount-automatically-for-selected-products/
and added automatic discount based on Product Tag.

How can I add a button on Ticket Screen, to remove this Discount. Because in certain situations I don’t want to give this discount.

Is there a way I can add a button which will reverse this discount

Its setting it on total changed so you will need to do two things, add a constraint to prevent auto discount calculation update, something like a ticket tag and constraint ticket tag is bull added to the update calculation rule.
Then a button to set that tag to something other than null and update calculation to 0.
Just updating calculation will change total and existing rule reset it again.

You might want to look at other discount options on the forum. It really comes down to what type of discount and discount method you’re trying to accomplish. I use both manual and automated discounts. I also use order tags for order level discounts (happy hour mainly). Take a look at Discount Ticket Total in the link below.

I want to give a discount based on the product tag.
Instead of applying automatically, I want a button on the ticket screen, when clicked, it should apply that discount to products in the ticket with that product tag. and toggle to remove the same.

https://kb.sambapos.com/en/4-59-applying-discount-automatically-for-selected-products/

Using the above method, I am able to apply discount based on product tag, but its applying automatically. I want that to made manual on press of a button, or at least a button to remove that particular discount if auto applied.

Could you guide how to do it ?

  • Create an automation command for your discount. Set mapping to show on ticket.
  • Combine all the “Appy x Discounts” actions into one rule.
  • Remove the constraint for Ticket Total [Not Equals] 0.
  • For the rule to apply the discount(s) change the Event Name from Ticket Total Changed to Automation Command Executed.
  • Add constraint for Automation Command Name [Equals] CommandNameHere where CommandNameHere is the Automation Command Name from above.

Now when you click your discount button they will be applied

2 Likes

That worked great thanks.

One more thing, now i am able to select the button to add and remove product tag based discount and then it shows total discount at the bottom.

Issue: It doesn’t show which order items are discounted. Is there a way i can add a order tag or change the color of the orders that are auto discounted based on above method.

This method is ticket based discount it is not really a per item discount. If you want a true per item discount you need to use a different method which there are several documented in the forum.