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 Name | Description |
1 | current_price | The price of the item |
2 | current_compare_price | The compare price of the item |
3 | cost_per_item | The cost price of the item |
4 | item_weight | Weight of the item |
5 | shop_metafields_namespace_key | Any shop level metafield. Example: shop_metafields_metalapp_goldprice In the example above, the metalapp is the namespace and goldprice is the key having a numeric value. |
The following functions are supported:
# | Function | Examples |
1 | MOD(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 |
2 | RANDOM(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.