yarn add @pinelab/vendure-plugin-variant-bulk-update
to install this plugin.
yarn add @pinelab/vendure-plugin-variant-bulk-update
to install this plugin.
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.
vendure-config.ts
:import {VariantBulkUpdatePlugin} from '@pinelab/vendure-plugin-variant-bulk-update';
plugins: [
VariantBulkUpdatePlugin,
...
];
price
of a product to €300 and save the product.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.
This plugin can easily be extendded to also bulk update other fields than price. So, Pull Requests are always welcome!