How would you organize such a scheme in Yii2?

Guys hi all! There was one difficulty in the understanding of the action!
Ka would You set up such a scheme:
Suppose the user, in a modal window, put a tick in the products, presses to buy. And after a while, he again put a tick in the products and clicks buy. But if suddenly he forgot that some of the goods already ordered before, it is necessary to pop up a modal window prompting you to combine orders, thereby eliminating duplicate and adding a new one.
Just words to do in the controller and JS scripts.
June 7th 19 at 14:31
1 answer
June 7th 19 at 14:33
Solution
just do it.

in a Modal window? do modal.
1) call the modal for ticks.
2) Do the order. (written to database)
3) the user repeats step 1.
4) we make again an application (that the person didn't fall off. and in the event of an error, we could call a Manager and fix the problem). but if there are repetitions in the order, then ask the person again to check your order.
I hope how does the form submits via js do not need to explain? this in your Internet. - cali.Senger99 commented on June 7th 19 at 14:36

Find more questions by tags Yii