This code shows a shopping example with a checkout calculating proper discount. The discount is based on the current sales action.
New customers pay full price, regular customers enjoy a 15% discount.
On December 24th, every customer is grandted 20% discount on the first product and 12.5% on the other products
On Black Friday, things go crazy. Every customer is awared a discount equal to the number of products in their basket, up to 80% off!