Pricing Setup for Shipping Costs
Learn how to configure distance-based pricing tables for the Shipping Costs Based on Distance extension. Create flexible pricing rules that combine fixed rates with per-distance charges.
How Pricing Works
The extension calculates shipping costs using a pricing table with distance ranges. Each range can have:
- Fixed Price - A base amount charged for that distance range
- Per km/mile Rate - An additional charge multiplied by the total distance
Final Cost = Fixed Price + (Distance × Per km Rate)
Creating a Pricing Table
Navigate to Magmodules → Shipping Costs Based on Distance → Shipping Method → Calculation and Pricing.
Table Structure
| Column | Description |
|---|---|
| From | Start of the distance range (inclusive) |
| To | End of the distance range (inclusive) |
| Fixed Price | Base shipping cost for this range |
| Per km/mile | Additional cost per distance unit |
Adding Rows
- Click Add to create a new pricing row
- Enter the distance range (From/To)
- Set the fixed price
- Set the per km/mile rate (use 0 for flat rate)
- Click Save Config
Pricing Examples
Example 1: Simple Flat Rate by Distance
| From | To | Fixed | Per km |
|---|---|---|---|
| 0 | 10 | 5.00 | 0 |
| 10 | 25 | 10.00 | 0 |
| 25 | 50 | 15.00 | 0 |
Result: Fixed prices based on distance zones. A customer 8 km away pays €5.00, a customer 20 km away pays €10.00.
Example 2: Per-Kilometer Only
| From | To | Fixed | Per km |
|---|---|---|---|
| 0 | 100 | 0 | 0.50 |
Result: Pure distance-based pricing. A customer 30 km away pays €15.00 (30 × €0.50).
Example 3: Base Fee + Per-Kilometer
| From | To | Fixed | Per km |
|---|---|---|---|
| 0 | 10 | 5.00 | 0 |
| 10 | 30 | 5.00 | 0.50 |
| 30 | 50 | 10.00 | 0.75 |
Calculation for 25 km:
- Falls in 10-30 km range
- Fixed: €5.00
- Per km: 25 × €0.50 = €12.50
- Total: €17.50
Calculation for 40 km:
- Falls in 30-50 km range
- Fixed: €10.00
- Per km: 40 × €0.75 = €30.00
- Total: €40.00
Example 4: Tiered Progressive Pricing
| From | To | Fixed | Per km |
|---|---|---|---|
| 0 | 5 | 3.00 | 0 |
| 5 | 15 | 5.00 | 0.30 |
| 15 | 30 | 8.00 | 0.50 |
| 30 | 50 | 12.00 | 0.75 |
Result: Increasing rates for longer distances, encouraging local customers.
Using Price Caps
Combine the pricing table with minimum and maximum price settings for additional control.
Configuration: Shipping Costs Based on Distance → Limit Rules → Minimal and Maximum Shipping Price
| Setting | Use Case |
|---|---|
| Minimal Price | Ensure a minimum charge even for very short distances |
| Maximum Price | Cap the shipping cost for long distances |
Example:
- Pricing table calculates €45.00 for a long-distance order
- Maximum Price set to €30.00
- Customer pays €30.00
Combining with Free Shipping
Set up free shipping thresholds that override the pricing table.
Configuration: Shipping Costs Based on Distance → Limit Rules → Free Shipping
| Setting | Description |
|---|---|
| Enable Free Shipping | Turn on free shipping feature |
| Minimal Order Amount | Order subtotal required for free shipping |
When the order meets the threshold, shipping cost becomes €0.00 regardless of distance.
Rounding Options
Control how the extension rounds calculated values.
Round Distance
Apply rounding to the calculated distance before price calculation:
- No rounding - Use exact distance (e.g., 12.7 km)
- Round up - Always round up (12.7 → 13 km)
- Round down - Always round down (12.7 → 12 km)
- Round to nearest - Standard rounding (12.7 → 13 km, 12.4 → 12 km)
Round Total Price
Apply rounding to the final shipping price:
- No rounding - Use exact calculated price
- Round up - Round to next whole number
- Round down - Round down to whole number
- Round to nearest - Standard rounding
Tips for Effective Pricing
Cover All Distances
- Ensure your ranges cover all possible distances
- Use your maximum delivery distance as the final "To" value
- Gaps in ranges will result in no shipping method shown
Consider Your Costs
- Factor in fuel costs, time, and vehicle wear
- Account for return trips
- Include handling and packaging time
Test Your Pricing
- Use the checkout with different test addresses
- Verify calculations match your expectations
- Check edge cases (exact range boundaries)
Monitor and Adjust
- Review actual delivery costs vs. charged rates
- Adjust pricing based on customer feedback
- Consider seasonal variations (winter driving conditions)
Need More Help?
Documentation:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team