Pinelab-studio / pinelab-vendure-plugins

Monorepo for different Vendure plugins developed by Pinelab
109 stars 49 forks source link

Dont send 'Collect in Store' to Shipmate #498

Closed martijnvdbrug closed 1 month ago

martijnvdbrug commented 2 months ago

For CG, we would not like to send order to Shipmate that have a 'Collect in Store' set as shipping method. However, we don't want to include this in the plugin, as this is very CG specific.

I think we should include a strateg/config in the Shipmate plugin:

shouldSendOrder(ctx: RequestContext, order: Order): Promise<boolean> | boolean

So that we can do this in the CG project:

Plugin.inti({
   shouldSendOrder: (ctx: RequestContext, order: Order) = order.shippingLines.contains('Collect in store')
})
martijnvdbrug commented 2 months ago

Dont send 'Collect in Store' to Shipmate