7.0.0 • Published 1 year ago
vendure-plugin-variant-bulk-update v7.0.0
Vendure Plugin for bulk updating all variants of a product
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
- Add the plugin config to your
vendure-config.ts
:
import {VariantBulkUpdatePlugin} from 'vendure-plugin-variant-bulk-update';
plugins: [
VariantBulkUpdatePlugin,
...
];
- Run a database migration to add the price field on a product.
- Start Vendure, login and go to a product.
- Set the field
price
of a product to €300 and save the product. - 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!