- Overseas / islands / remote areas
- Local free shipping
- Blocking shipping in unsupported areas
- Percentage-based fees
- Does the module create carriers?
- What happens if no zone matches?
- Does it support alphanumeric postcodes (UK, CA)?
- Can I use it with a One Page Checkout?
- The module does not appear in the Shipping menu
- Fees do not change at checkout
- A carrier disappears at checkout
Shipping Cost by Zip Code — Shipping fees by postal code
Shipping Cost by Zip Code is a PrestaShop module that lets you apply accurate shipping fees based on the customer’s postal code. You create custom postal zones (unlimited), assign postal codes (single values or numeric ranges), then define carrier-specific pricing using weight brackets or cart amount brackets.
Unlike the native zone/country approach, this is ideal when costs vary strongly between city centers, rural areas, islands, mountains, overseas territories, etc. The module does not add carriers: it adjusts the rates of your existing carriers during checkout, based on the postal code.
Key benefits:
- Unlimited postal zones (single codes and numeric ranges)
- Carrier pricing + unlimited brackets (by weight or by cart total)
- Free shipping (per bracket, per zone, or from a threshold)
- CSV import/export for bulk setup
- Priority system when zones overlap
- Multistore, multilingual, no overrides
Overview
By default, PrestaShop calculates shipping costs based on geographical zones and countries, which quickly becomes too coarse. A store may need different rates depending on distance, accessibility, or real carrier costs—even within the same country.
With Shipping Cost by Zip Code, you create rules at the postal-code level:
- Create a postal zone (e.g., “City center”, “Mountain area”, “Overseas”).
- Add postal codes (list) or ranges (e.g., 75001 → 75020).
- Configure pricing per carrier with weight-based or price-based logic.
If no zone matches a postal code, the module behavior is configurable: apply standard PrestaShop rates, or block shipping (carriers hidden).
Features
Postal-code delivery zones
- Create unlimited postal zones
- Postal code formats:
- Single codes (one code or a list)
- Numeric ranges (e.g., 75001 to 75020)
- Multiple countries can be used in the same zone
- Enable/disable zones
- “Shipping disabled” option: hide carriers at checkout for a given zone
- Priority system to handle overlapping zones
Advanced carrier pricing
- Pricing by carrier and by zone
- Calculation mode:
- Weight (kg)
- Price (cart total)
- Unlimited brackets (0–5, 5–10, etc.)
- Fixed fees or percentage-based fees
- Free shipping:
- per bracket
- per zone / carrier
- automatically from a configured cart threshold
- “All carriers” option: apply a rule to all carriers at once
Back-office productivity
- Integrated back-office interface under Shipping
- Zones list with search / filters / sorting and position ordering (drag & drop)
- “All-in-one” editor: general settings + postal codes + pricing on the same page
- CSV import with error reporting
- CSV export of the full configuration
- Sample CSV file included
Technical approach
- Compatible with PrestaShop 1.7.7, 8.x and 9.x
- Multistore compatible
- Multilingual support (zone names translatable)
- No core overrides
- Uses
id_carrier_reference(resilient to carrier changes) - Optimized queries + in-memory cache (postal code → zone matching)
Requirements
- PrestaShop: 1.7.7.0 minimum (compatible 1.7.7 → 9.x)
- PHP: 7.4+ (compatible 7.4 → 8.3)
- MySQL: 5.6+ / MariaDB: 10.1+
Important limitation: only numeric postal codes are supported. Countries using alphanumeric postcodes (e.g., UK, Canada, Netherlands) are not supported.
Installation
Method 1 — via Back Office (recommended)
- Go to Modules > Module Manager
- Click Upload a module
- Select
wepresta_shipping_cost_by_zip.zip - Wait for installation to complete
- Click Configure
Method 2 — via FTP
- Unzip the archive
- Upload the folder
wepresta_shipping_cost_by_zip/into/modules/ - In Back Office: Modules > Module Manager
- Find the module and click Install
- Click Configure
What installation does
- Creates 4 tables:
wep_zip_zone,wep_zip_zone_lang,wep_zip_range,wep_zip_delivery - Registers required hooks
- Adds a “Shipping by Zip Code” tab under Shipping
- Initializes a default configuration
Note: the module does not create carriers. It modifies existing carrier costs depending on the postal code.
Configuration
Access:
- Modules > Module Manager > Configure
- or Shipping > Shipping by Zip Code
Global settings
- Enable module: enable/disable postal-code calculation
- Default behavior (if no zone matches):
- Use standard fees: PrestaShop applies its native rates (recommended to start)
- Block shipping: carriers are not shown at checkout
Zone management
Access: Shipping > Shipping by Zip Code
Create a zone
- Click Add new zone
- Fill in:
- Zone name (multilingual)
- Active (Yes/No)
- Shipping disabled (Yes/No)
- Click Save
Add postal codes
In the zone editor, Postal codes section:
- Select the country
- Add either:
- List of postal codes (comma-separated):
75001, 75002, 75003
- or a range:
- from
75001to75020
- from
- List of postal codes (comma-separated):
- Click + Add
Only numeric postal codes are supported.
Configure carriers and prices
In the Carriers & pricing section:
- Select a carrier (or All carriers)
- Choose the type:
- Weight (kg) or Price (cart total)
- Define the bracket:
- min / max
- Set the fee
- Options:
- Percentage (if enabled, the amount is a % of the cart)
- Free shipping
- Free from (cart threshold)
- Click + Add pricing rule
CSV import / export
CSV format
- Separator: semicolon
; - Encoding: UTF-8
Main columns:
zone_name(required)country_iso(required)postal_code_from(required)postal_code_to(optional: empty = single code)carrier_reference(required)calculation_type:weight/price(required)range_from,range_to,price(required)is_percentage,is_free,free_from_amount(optional)
Import
- Shipping > Shipping by Zip Code
- Import CSV
- Select the file
- Import and review the report (OK / updated / errors)
Helpful behaviors:
- An existing zone with the same name is reused (no duplicates)
- Existing ranges are not duplicated
- An identical pricing rule is updated
Export
- Click Export CSV
- The downloaded file uses the same format as the import
Priority system
Each zone has a position (sortable). If a postal code matches multiple zones, the zone with the lowest position is used.
Matching order:
- Exact match (single postal code)
- Range match
- If multiple matches, zone position decides
Multistore
The module is multistore compatible:
- Zones and pricing are shown depending on the context (all shops / group / shop)
- A zone is assigned to the active shop context when created
- To apply the same setup across shops: export/import via CSV
Customer-side behavior
At checkout, the module is transparent:
- Customer enters an address (with postal code)
- PrestaShop displays carriers
- The module adjusts shipping fees according to the matching zone
The customer will see:
- fees adapted to their postal code
- potentially fewer carriers if a zone is set as “non-deliverable”
- free shipping if configured
Common use cases
Overseas / islands / remote areas
Create a dedicated zone (e.g., 97100 → 97490) with higher rates than mainland.
Local free shipping
Create a “local” zone (nearby postal codes) with free shipping, while keeping standard fees elsewhere.
Blocking shipping in unsupported areas
Create a “non-deliverable” zone and enable Shipping disabled to hide carriers.
Percentage-based fees
Useful for high-value carts: e.g., 3% of cart total, then free above a threshold.
FAQ
Does the module create carriers?
No. It uses your existing carriers and adjusts the shipping cost calculation based on postal code.
What happens if no zone matches?
Depending on global settings:
- either PrestaShop applies standard fees
- or shipping is blocked (carriers hidden)
Does it support alphanumeric postcodes (UK, CA)?
No, numeric postal codes only.
Can I use it with a One Page Checkout?
Yes. Pricing is calculated server-side through getOrderShippingCost(), compatible with the standard checkout and OPC.
Troubleshooting
The module does not appear in the Shipping menu
- Check it is installed and enabled
- Clear cache: Advanced Parameters > Performance > Clear cache
- Check employee permissions
Fees do not change at checkout
- Module enabled?
- Matching zone exists and is active for the postal code?
- Pricing rules configured for that zone + carrier?
- Brackets cover the cart weight/price?
- Cache cleared?
A carrier disappears at checkout
- Zone is set to Shipping disabled
- Default behavior = Block shipping and no zone matches
- No pricing rule exists for that carrier in the matched zone
Changelog
Version 1.0.0
- Unlimited postal zones
- Single postal codes + numeric ranges
- Weight-based or price-based pricing
- Percentage of cart total
- Free shipping (per bracket / threshold)
- Shipping blocking per zone
- Zone priorities
- CSV import / export
- Multistore + multilingual
- Compatibility PrestaShop 1.7.7 → 9.x
Support
- Support via the module page (PrestaShop Addons) or your WePresta customer area
- Typical response time: 24–48 business hours
Before contacting support, please provide:
- PrestaShop version
- PHP version
- Clear issue description
- Screenshots
- PrestaShop logs if available
License
Academic Free License (AFL 3.0).
Copyright © WePresta. All rights reserved.