Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
- Fixed Lithuanian and Latvian translations for shipping label in admin order panel
- Added Poland parcel shop import support with batch processing
- Fixed null parameter deprecation in AddressAdapter preg_replace calls
- Improved pickup point import to warn when DPD returns 0 points and keep existing points instead of reporting a false success
- Fixed shipment creation failing for accounts requiring Predict SMS service
- Fixed additional validation for supercheckout module using currentcontroller variable
- Fixed automatic PUDO point pre-selection in LIST mode
Expand Down
17 changes: 17 additions & 0 deletions src/Service/Import/API/ParcelShopImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,23 @@ public function importParcelShops($selectedCountry)
}

$parcelCount = count($parcelShops);

if ($parcelCount === 0) {
$this->logger->warning(sprintf(
'[ParcelImport] API returned 0 parcel shops for %s | API took: %ss',
$selectedCountry,
$apiTime
));

return [
'success' => false,
'error' => sprintf(
$this->module->l('DPD returned 0 pickup points for %s. Existing pickup points were kept. The web service account may not be enabled for pickup point retrieval - please contact DPD.', self::FILE_NAME),
$selectedCountry
)
];
}

$dbStartTime = microtime(true);

try {
Expand Down
Loading