All Collections
Products
Assign product fields in bulk
Assign product fields in bulk

How to assign values or calculate product fields in bulk based on other fields

Updated over a week ago

You can assign simple or calculated values to many product fields at once using bulk operations.

To assign values in bulk follow the steps below.

1. Go to products screen and choose product category from the left sidebar

2. Select Assign Field in the Bulk Actions dropdown

3.  Select target product field and operation Assign or Calculate

4. Enter expression for assignment and click Apply

You can enter simple expressions like My description, 0, etc. or more complex that do calculations and reference other fields in the format {{Field}}.

Assign operations are simply overriding the value of the field, e.g.

Buy {{Name}} for {{Price}}.

You can, for example, add a currency symbol to the price:  $ {{Price}}.

Calculate operations evaluate mathematical expression:

  1. Arithmetic including brackets, e.g.({{Price}} + 1) * 1.13

  2. Rounding to required decimal placesround({{Price}} * (100 - {{Discount}}) / 100, 1)

  3. Adding fixed number of decimals({{Price}}).toFixed(2)

  4. Other math functions, e.g.sin(45 deg) ^ 2

Our implementation uses Math.js library and you can read more at http://mathjs.org to learn what expressions, operations and functions are supported.

You can use any product expressions that return a single value. For example, extract first variant price: {{Variants:LimitBy=1}}{{Price}}{{/Variants}}
Find more expressions for products, variants, etc.

Did this answer your question?