@vicacha-devs/medusa-fulfillment-eu 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -0
- package/package.json +6 -1
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# `@vicacha-devs/medusa-fulfillment-eu`
|
|
2
|
+
|
|
3
|
+
EU & Benelux fulfillment provider plugin for **Medusa v2**, supporting **PostNL Letterbox**, **Sendcloud EU Parcel**, and **Rotterdam LCL Pallet Freight** with configurable free-shipping thresholds by region and weight.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Key Features
|
|
8
|
+
|
|
9
|
+
- **3 Built-in Fulfillment Options**:
|
|
10
|
+
- `postnl-letterbox`: Low-cost letterbox parcel for lightweight shipments (`<= letterboxMaxGrams`).
|
|
11
|
+
- `sendcloud-eu-parcel`: Standard Benelux (`NL`, `BE`, `LU`) and pan-EU parcel delivery.
|
|
12
|
+
- `rotterdam-lcl-pallet`: Palletized LCL freight for heavy orders (`>= palletWeightGrams`) or bulk (`isGreenBulk`) shipments.
|
|
13
|
+
- **Smart Rate & Free-Shipping Calculator**: `calculateEuShippingQuote()` evaluates Benelux vs. EU thresholds, weight qualification (`freeWeightGrams`), and remaining amount needed for free shipping.
|
|
14
|
+
- **SSRF-Safe & Offline Tested**: Pure TypeScript fulfillment provider (`AbstractFulfillmentProviderService`) with unit tests.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Installation & Configuration
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pnpm add @vicacha-devs/medusa-fulfillment-eu
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Register the fulfillment module provider in `medusa-config.ts`:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { defineConfig } from "@medusajs/framework/utils"
|
|
28
|
+
|
|
29
|
+
export default defineConfig({
|
|
30
|
+
plugins: [
|
|
31
|
+
{
|
|
32
|
+
resolve: "@vicacha-devs/medusa-fulfillment-eu",
|
|
33
|
+
options: {},
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
modules: [
|
|
37
|
+
{
|
|
38
|
+
resolve: "@medusajs/medusa/fulfillment",
|
|
39
|
+
options: {
|
|
40
|
+
providers: [
|
|
41
|
+
{
|
|
42
|
+
resolve:
|
|
43
|
+
"@vicacha-devs/medusa-fulfillment-eu/providers/eu-fulfillment",
|
|
44
|
+
id: "eu-fulfillment",
|
|
45
|
+
options: {
|
|
46
|
+
beneluxFreeThresholdEur: 25,
|
|
47
|
+
euFreeThresholdEur: 50,
|
|
48
|
+
freeWeightGrams: 1000,
|
|
49
|
+
palletWeightGrams: 24000,
|
|
50
|
+
beneluxPalletEur: 45,
|
|
51
|
+
euPalletEur: 85,
|
|
52
|
+
letterboxRateEur: 4.25,
|
|
53
|
+
beneluxParcelRateEur: 6.95,
|
|
54
|
+
euParcelRateEur: 12.95,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
})
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Options Reference (`EuFulfillmentOptions`)
|
|
67
|
+
|
|
68
|
+
| Option | Default | Description |
|
|
69
|
+
| :----------------------------------------- | :--------------- | :------------------------------------------------------------- |
|
|
70
|
+
| `beneluxFreeThresholdEur` | `25` | Free-shipping subtotal threshold (EUR) for `NL`, `BE`, `LU` |
|
|
71
|
+
| `euFreeThresholdEur` | `50` | Free-shipping subtotal threshold (EUR) for other EU countries |
|
|
72
|
+
| `freeWeightGrams` | `1000` | Weight threshold (grams) qualifying for free standard shipping |
|
|
73
|
+
| `palletWeightGrams` | `24000` | Weight threshold (grams) triggering `rotterdam-lcl-pallet` |
|
|
74
|
+
| `beneluxPalletEur` / `euPalletEur` | `45` / `85` | Pallet freight rate (EUR) |
|
|
75
|
+
| `letterboxRateEur` | `4.25` | PostNL letterbox rate (EUR) |
|
|
76
|
+
| `beneluxParcelRateEur` / `euParcelRateEur` | `6.95` / `12.95` | Standard parcel rate (EUR) |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Development & Testing
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pnpm --filter @vicacha-devs/medusa-fulfillment-eu test
|
|
84
|
+
pnpm --filter @vicacha-devs/medusa-fulfillment-eu typecheck
|
|
85
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vicacha-devs/medusa-fulfillment-eu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "EU & Benelux fulfillment provider plugin for Medusa v2 (PostNL letterbox, Sendcloud EU parcel, and Rotterdam LCL pallet freight).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eu",
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
],
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"author": "Vicacha Devs",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/Vicacha-Devs/medusa-plugins.git",
|
|
21
|
+
"directory": "packages/fulfillment-eu"
|
|
22
|
+
},
|
|
18
23
|
"files": [
|
|
19
24
|
".medusa/server",
|
|
20
25
|
"dist",
|