Formula Builder

Gaurav S

Last Update 12 dagen geleden

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
2current_compare_priceThe compare price of the item
3cost_per_itemThe cost price of the item
5shop_metafields_namespace_keyWeight of the item
5shop_metafields_namespace_keyWeight of the item
 

The following functions are supported:
#Function
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.


Watch the video for reference.

Was this article helpful?

0 out of 0 liked this article