7.0.0 • Published 1 year ago

vendure-plugin-myparcel v7.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Vendure MyParcel Plugin

Vendure version

Official documentation here

Plugin for sending placed orders to MyParcel.

Getting started

  1. Add this to your plugins in vendure-config.ts:
import { MyparcelPlugin } from 'vendure-plugin-myparcel';

plugins: [
  MyparcelPlugin.init({
    vendureHost: 'https://your-vendure-host.io',
    syncWebhookOnStartup: true, // If you want to automatically set vendureHost as webhook on MyParcel account
  }),
  ...
]
  1. Add MyparcelPlugin.ui to your AdminUiPlugin extensions:
import { MyparcelPlugin } from 'vendure-plugin-myparcel';

plugins: [
  AdminUiPlugin.init({
    port: 3002,
    route: 'admin',
    app: compileUiExtensions({
      outputPath: path.join(__dirname, '__admin-ui'),
      extensions: [MyparcelPlugin.ui],
    }),
  }),
];

Read more about Admin UI compilation in the Vendure docs

  1. Start Vendure and go to Settings > MyParcel and fill in your MyParcel API key.
  2. Create a shipmentMethod with MyParcel fulfillment.
  3. Place an order and select the shippingMethod.
  4. Go to the Admin UI and click on fulfill
  5. Your shipment should be in your MyParcel account.

Customs information for shipments outside the EU

MyParcel requires additional customs information for shipments outside the EU. When you ship outside the EU, you should implement the getCustomsInformationFn when initializing the plugin:

MyparcelPlugin.init({
  vendureHost: 'https://your-vendure-host.io',
  getCustomsInformationFn: (orderItem) => {
    return {
      weightInGrams: (orderItem.line.productVariant.product.customFields as any)
        .weight,
      classification: (
        orderItem.line.productVariant.product.customFields as any
      ).hsCode,
      countryCodeOfOrigin: 'NL',
    };
  },
});

You can find more information about the classification codes here.

5.5.0

1 year ago

5.4.0

1 year ago

5.0.1

1 year ago

6.0.0

1 year ago

7.0.0

1 year ago

5.6.7

1 year ago

4.10.0

1 year ago

3.21.0

2 years ago

4.5.0

1 year ago

4.4.0

1 year ago

4.1.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.3.0

1 year ago

4.1.2

2 years ago

3.19.0

2 years ago

3.13.0

2 years ago

3.8.1

2 years ago

3.3.1

2 years ago

3.7.0

2 years ago

3.11.1

2 years ago

3.0.4

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.5.0

2 years ago

2.4.0

2 years ago

2.7.0

2 years ago

1.3.4

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

2.2.1

2 years ago

2.0.3

2 years ago

2.1.1

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.2.2

2 years ago

2.0.4

2 years ago

2.0.6

2 years ago

2.0.1

2 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago