Posted on 06/06/2025 17:40:35
Hi Nicolai,
This is the breakdown of what needs to happen:
Technical Overview – Transport Cost Calculation Logic
Input Parameters per Shipment
Each shipment is calculated based on the following fields:
Field |
Unit |
Required |
Description |
Width |
cm |
✅ |
Width of the package |
Height |
cm |
✅ |
Height of the package |
Length |
cm |
✅ |
Length of the package |
Weight |
kg |
✅ |
Actual (physical) weight of the package |
Zone |
1-3 |
✅ |
Based on delivery location |
Packing Fee |
€ |
Optional |
Fixed fee per shipment (default = €5) |
📐 Additional Calculation: Volumetric Weight
Volumetric weight is calculated using the following formula:
Volumetric Weight = (Length × Width × Height) / 5000
This value is then compared to the actual weight to determine the transport cost.
Cost Calculation Logic
-
If Volumetric Weight < Actual Weight
-
If Volumetric Weight > Actual Weight
-
If Volumetric Weight = Actual Weight
The packing fee is added to the final transport cost.
Zone Rates
There are 3 zones, each with a specific per-kg multiplier:
Zone |
Multiplier (€ per kg) |
1 |
€1.00 |
2 |
€0.70 |
3 |
€0.35 |
Final transport cost:
Transport Cost = max(25, max(Weight, Volumetric Weight) × Zone Rate) + Packing Fee
Output Fields
For each shipment, the system should return:
-
Final calculated transport cost (including packing)
-
A breakdown for transparency (e.g. weight used, zone, multiplier applied)
Technical summary
-
- Automatically calculate volumetric weight based on product dimensions
-
Determine shipping zone from delivery address (e.g. country or postal code)
-
Implement shipping cost logic as a configurable module or service
-
Enforce minimum cost rule (€25) when applicable
-
Allow admin users to manage:
-
-
Zone rate multipliers
-
Minimum price
-
Packing fee
