S
S
Sergey Kalina2018-02-26 15:37:40
Yii
Sergey Kalina, 2018-02-26 15:37:40

Yii2. How to implement calculators in an online store?

All good.
Faced a problem when it is necessary to implement a complex calculation of the cost of goods from the data entered by the user. There is a page with a product, one of the cost calculation options should be attached to it with restrictions on the ability to select options for each product. That is, there is no way to use several ready-made calculators. Now I'm thinking of classifying and calling calculations depending on the settings of this product. Who has experience, who faced how best to implement this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-02-26
@webinar

There are many options for how to implement this. On your question, it is definitely difficult to advise something (describe with an example), but it seems to me that the question is more in the direction of js and yii here in any way.
Implemented a bunch of different calculators, somewhere it is more convenient to do calculations in js when you need to dynamically hide certain form elements depending on the choice of others. Somewhere it's ajax + json and the form is broken into steps dependent on the previous selection. But it's all js, not yii. Sometimes you can send the entire form to the server and do the calculations there, but again, there is more mathematics and php, I don’t understand how it is connected with yii.
If there is a specific problem with yii, describe it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question