Back to plugins & integrations

Variant Bulk Update icon

Variant Bulk Update

Update prices of all variants for a product

npm install @pinelab/vendure-plugin-variant-bulk-update

Integration type

Partner
Plugins built by certified Vendure partners

Category

Other

Last published

118 days ago

Downloads in past month

36
README.md

Vendure Plugin for bulk updating all variants of a product

Vendure version

Official documentation here

Tiny plugin that allows you to update the prices of all variants for a given product. This is especially useful for products with a lot of variants.

Getting started

  1. Add the plugin config to your vendure-config.ts:
import {VariantBulkUpdatePlugin} from 'vendure-plugin-variant-bulk-update';

plugins: [
  VariantBulkUpdatePlugin,
  ...
];
  1. Run a database migration to add the price field on a product.
  2. Start Vendure, login and go to a product.
  3. Set the field price of a product to €300 and save the product.
  4. All variants of the product will now be €300.

If you only want to update variants once, you should clear the product.customFields.price field again. When the price field has a value, and a product is updated, all variants will be updated again.

Update of variants is done async, so it might happen that you need to refresh your product page to fetch the updated prices.

Contribute

This plugin can easily be extendded to also bulk update other fields than price. So, Pull Requests are always welcome!