Formula Builder

Mane Ankit

Last Update pred 3 mesiacmi

The app enables bulk price editing using a mathematical formula. Along with the regular mathematical operations, you can use variables and functions to build the formula.


Example formula:
Price = (item_weight * 1.2)  + (cost_per_item*1.8)

The following variables are allowed:
#Variable NameDescription
1current_priceThe price of the item
2compare_at_price

OR

current_selling_price
The compare price of the item

OR

Discounted price of the item when discount exists
3cost_per_itemProduct cost price
4item_weight Weight of the item

Note:
  • Missing variable values default to 0 at execution time.
  • Formula output is clamped to minimum 0.


The following functions are supported:
#FunctionExamples
1MOD(number, divisor)

Returns the remainder after number is divided by divisor.
MOD(3,2)
Result: 1

current_price + (9- (MOD(current_price, 10)))
Pricing variables can be used to create custom logic
2RANDOM(min, max)

Returns a random integer between min and max
RANDOM(5, 15)
Result: 11 (or any number between 5 and 15 (inclusive))

current_price + ( current_price * ( RANDOM(15,25)*0.01 ) )
In the example above, each product's price will be adjusted randomly between 15% and 25%.

Additional variables and functions can be added based on request.



Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us