How to automatically calculate the size of a variant
An example of how to use the calculate action
Last updated
An example of how to use the calculate action
Last updated
To make a rule that will calculate the volume of a variant based on the dimensions of that variant, make a trigger that triggers when any of the dimensions change.
Then add an action and choose "Calculate value". When configuring the action click "+Add math calculation" and choose "Add math operation". In this example we start by multiplying the height and width. That result is then multiplied with the length. Finally that result is multiplied with 0,001 to make sure the units are correct.
Finally choose what attribute the result should be written to.
Note By clicking the operator between the values you can choose the operator (x,/,+,-).