I am working on an Online store in Scala. I want to apply discount on items added to the Cart by User. The discounts are of following types:
1) Buy some get some items free
Example: Buy 3 T-shirts Get 2 Free
2) Buy some get some percentage discount
Example: Buy 3 T-shirts Get 10% discount
3) Buy some get some items free - Applies on whole category
Example: Category: T-Shirts
Item1 : TShirt One
Item2 : Tshirt Two
Now the discount should get applied on all the items under "T-Shirts" category
4) Buy some get some percentage discount - Applies on whole category Same as 3. , just we need to give some percentage discount, example 10% discount on all T-Shirts
Can someone tell how to model and how can we handle to apply these discounts?
Aucun commentaire:
Enregistrer un commentaire