Show nearby parcel drop off points to your customers. Supports multiple carriers and allows custom carriers. Also known as collection points or pickup points.
Add the plugin to your vendure-config.ts:
Run a database migration to add the drop off point custom fields to an order. If you want to use your own custom fields, see "Using your own custom fields" below.
unsetParcelDropOffPoint to void all the fields again.By default, this plugin creates the following custom fields on an order: dropOffPointCarrier, dropOffPointId, dropOffPointName, dropOffPointStreetLine1, dropOffPointStreetLine2, dropOffPointHouseNumber, dropOffPointHouseNumberSuffix, dropOffPointPostalCode, dropOffPointCity, dropOffPointCountry.
If you would like to use your own custom fields for drop off points, you can implement the setDropOffPointOnOrder and unsetDropOffPoint functions, like so:
If you supply customMutations in the plugin config, you don't have to do a database migration, because the plugin will not add any custom fields to the order.
You can easily implement your own drop off point carriers, by implementing the DropOffPointCarrier interface.
You can then pass it into the plugin:
TL;DR: Avoid an extra API call to drop off point carrier.
The drop off point's token is a base64 encoded string of the address details of a point. This is used to save the drop off point on an order when you call the setParcelDropOffPoint mutation, without the need to refetch the points from the external API.