First, you can create a title for the element.
Now, let's dive into the interesting stuff... By default, the Variable Math element creates 2 products that you can change or customize easily.
You can change the product's name, value in price, max quantity and a type of front-end element to control this product.
You can also click on the "+Add Item" button to add more products
Now, here it comes the real power of the Variable Math element. With the "Total Calculation" field, you can create math operations (+, -, *, /) to operate with all the products/services you created.
For instance, in the next image we are calculating the shipping cost based on the product dimension (width, height, length)
And we are multiplying each value to get the total calculation:
And this is the end result:
Linking Element Values
In the latest versions of Stylish Cost Calculator, you can link other elements as a variable in Variable Math. The calculated value of the element will be the value returned by the variable. Use the "[+] Link Element" button to add an element as a variable.
You can also add a section's total to the variables list.
Input1 * (1.15)
The above code will add 15% to the value of Input1
Advanced Options of Variable Math
Default 0 Value: Enabling this option will set the value of variables that have not returned any value set to 0 and will let the formula execute. If not enabled, the formula will not execute until all of the variables becomes available.
We would like to encourage you to try it out. Many users find solutions to complex problems that didn't even occur to us.