Skip to content

Commit

Permalink
docs: Add missing step to digital products guide
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Sep 30, 2024
1 parent ebfabbd commit 73715a1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/docs/guides/how-to/digital-products/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,28 @@ function generateDownloadUrl(orderLine: OrderLine) {
}
```

This fulfillment handler should then be added to the `fulfillmentHandlers` array the config ShippingOptions:

```ts title="src/plugins/digital-products/digital-products-plugin.ts"

import { LanguageCode, PluginCommonModule, VendurePlugin } from '@vendure/core';
import { digitalFulfillmentHandler } from './config/digital-fulfillment-handler';

@VendurePlugin({
imports: [PluginCommonModule],
configuration: config => {
// config.customFields.ProductVariant.push({ ... omitted
// config.customFields.ShippingMethod.push({ ... omitted
// config.customFields.Fulfillment.push({ ... omitted
// highlight-start
config.shippingOptions.fulfillmentHandlers.push(digitalFulfillmentHandler);
// highlight-end
return config;
},
})
export class DigitalProductsPlugin {}
```

### Create a custom ShippingEligibilityChecker

We want to ensure that the digital shipping method is only applicable to orders containing at least one digital product.
Expand Down

0 comments on commit 73715a1

Please sign in to comment.