Answer the question
In order to leave comments, you need to log in
Discount system for goods and baskets, how to implement the conditions?
Hello, this is the first time I've encountered a similar task and I can't get off the ground, because. I don't understand where to start. The task has the following conditions:
1. The ability to specify promotional codes that work for the total amount in the basket or for one product. They can be individual and general.
2. Discount on the total amount in the basket, the conditions can be as follows:
1. from 5500 to 10000 3%
discount 2. from 10000 5%
discount 3. 15% discount for one item or 350 rubles
4. Instead of a discount, present. For example, give out a toy when ordering a product.
5. Ability to start and stop the promotion by date.
I see the following tables:
According to the main table, the following data:
zone = 'cart' (cart, product) // К чему применить, к всей корзине или к продукту
conditions = [
0 => [
'operator' => '>='
'value' => '3500',
],
1 => [
'operator' => '<'
'value' => '5500',
]
]
bonus = [
'value' => '-3%' // вместо value, может быть product и его id, как подарок. Если процента нет, то отнимает рубли.
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question