Why mini-programs?
In advanced applications such as pricing custom-made products, the price does not depend on the sum of the components. For example, you cannot get the price of e.g. a mast by multiplying only the length given in centimetres by the price in centimetres. In life, the mast can be up to a certain length. Within a certain length range it is cut from a standard "pipe" for example. In the further length range from the longer and then very high masts are made from scratch to order, but the longer the mast, the thicker it will be, so the price will not increase linearly. There are thousands of such valuations in the world of personalized products. So far the owners of such shops have been doomed to open source software, in which they could obtain such action by modifying its code. However, thanks to the possibility of using in the IdoSell service mini-programs called by us formulas for calculating prices in JavaScript, you can write a piece of software that will calculate the price and then upload it into a special field in the editing of a product.
Example of using the formula to calculate the price in JavaScript in the IdoSell store mask
A product card with a choice of parameters that affect the final price calculated using the JS formula.
"Carted product at a price generated by the JS formula.
Details of an order containing a product whose price has been generated using the JS formula.
Security against fraudsters
Of course you could ask, what's the big deal? After all, I can write a program in JavaScript in any program and add it to the product card e.g. in the description field. Sure, but this way, a hacker or a user who knows the basics of JavaScript could modify the value of variables in the page code of his browser and then "inject" the price he considers appropriate (e.g. 150 GBP instead of 300 GBP) and order a more expensive product for that.
As the IdoSell service is created for professional and automated shops, our solution is very safe. When you decide to add a product to the shopping cart, a program written in JavaScript is run with selected parameters of a product card on the server side, and in this way the price is calculated, which is processed in the cart. Therefore, the modification of the product value by the user shall not give him anything, as it shall not cheat the system.
All works on the creation of the configurator are settled in the mode
time & material