This package has been deprecated

Author message:

Moved to @pinelab/vendure-plugin-variant-bulk-update

vendure-plugin-variant-bulk-update
TypeScript icon, indicating that this package has built-in type declarations

7.0.0 • Public • Published

Vendure Plugin for bulk updating all variants of a product

Vendure version

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!

Readme

Keywords

none

Package Sidebar

Install

npm i vendure-plugin-variant-bulk-update

Weekly Downloads

55

Version

7.0.0

License

MIT

Unpacked Size

6.84 kB

Total Files

4

Last publish

Collaborators

  • mbrug