Spain Shipping Zones for PrestaShop 9.x
PrestaShop 9.x introduces important improvements but also critical errors with carriers. This bundle includes the complete Spanish zones module plus the official FIX for the TypeError in carriers.
This free PrestaShop 9.x bundle solves strict typing errors in PHP 8+ and correctly configures the 52 Spanish provinces with custom logistics zones.
Tutorial: Module installation + FIX application in PS9
What does this PrestaShop 9 bundle include?
PrestaShop 9 with PHP 8+ generates TypeError errors when managing carriers. This bundle solves both problems:
? TypeError: Return value must be of type int
? TypeError: Argument must be of type int, string given
? Incomplete or incorrect Spanish provinces
? Unable to create regional logistics zones
? FIX for CarrierRepository.php
? FIX for CarrierRangeRepository.php
? 52 configured Spanish provinces
? Functional logistics zones system
? Included FIX: TypeError in Carriers
Solved problem: PrestaShop 9.x generates errors when creating or editing carriers due to PHP 8+ strict typing.
Corrected files:
/src/Adapter/Carrier/Repository/CarrierRepository.php/src/Adapter/Carrier/Repository/CarrierRangeRepository.php
Solution: Forced casting to integer in critical methods (getOrdersCount(), getRangeMethodTable()).
What the complete bundle includes
FIX technical details
The FIX modifies two critical PrestaShop 9 core files to resolve typing incompatibilities:
CarrierRepository.php (line 341)
Forces conversion to int in getOrdersCount() to avoid string returns.
CarrierRangeRepository.php (line 191)
Validates integer type in getRangeMethodTable() before processing.
Module tables:
ps_es_shipping_zones? Stores custom zonesps_es_shipping_zone_province? Links zones with provinces- Bidirectional sync with
ps_stateandps_zone
// Forced integer conversion
public function getOrdersCount(int $carrierId): int
{
$result = $this->connection->fetchOne($sql);
return (int)$result; // FIX: explicit casting
}
Advantages of the PS9 bundle
No PHP Errors
Definitive FIX for carrier TypeError
Complete Provinces
52 official Spanish provinces
Custom Zones
Create personalized logistics groupings
Smart Selectors
Buttons: Peninsula, Balearics, Canaries
Carriers Ready
Native integration with shipping carriers
PHP 8+ Compatible
Works with strict typing
Installation in PrestaShop 9.x
Apply the FIX first
Back up the /src/Adapter/Carrier/Repository/ folder and replace the 2 corrected files. Clear cache: /var/cache/prod/.
Install the module
Upload es_shipping_zones.zip from the module manager. It automatically synchronizes the 52 provinces upon installation.
Create logistics zones
Access the module configuration. Name your zone, use the quick buttons (Peninsula, Islands) and save.
Configure carriers
Go to Shipping ? Carriers. The created zones will be available to assign differentiated rates.
?? Important for PrestaShop 9
The FIX modifies PrestaShop core files:
- Make a complete backup before applying the FIX
- The modified files are located in
/src/Adapter/Carrier/Repository/ - The module deletes old Spanish provinces and recreates them
- Optionally, you can use PSR-4 overrides in
/Override/PrestaShop/Adapter/ - Always clear
/var/cache/after applying changes
If PrestaShop releases updates, verify that the FIX files are not overwritten and reapply them if necessary.
Download PrestaShop 9.x Bundle
Module + TypeError FIX for PS 9.0 - 9.2
?? Download Complete 9.x BundleES Shipping Zones v1.0.1 + FIX PS9
Developed by Disciplina Digital | Javier Ortiz
Compatible PrestaShop 9.0.0 - 9.2.x | PHP 8.1+ | Free