1
0
Fork 0
mirror of synced 2025-04-20 01:21:01 +00:00

Update RetailCrmService.php

This commit is contained in:
DmitreyZl 2020-09-01 16:49:49 +03:00 committed by GitHub
parent fefc26e8f1
commit 5fbaafd4d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,31 +7,41 @@ class RetailCrmService
$deliveryCode = $order['delivery']['code'];
if ($deliveryCode) {
switch ($integrationDelivery[$deliveryCode]) {
case "sdek":
case "sdek":
unset($order['number']);
unset($order['height']);
unset($order['length']);
unset($order['width']);
unset($order['weight']);
unset($order['phone']);
unset($order['delivery']['cost']);
unset($order['shipmentStore']);
unset($order['delivery']['address']);
unset($order['delivery']['data']);
break;
case "dpd":
unset($order['manager']);
unset($order['firstName']);
unset($order['lastName']);
unset($order['weight']);
unset($order['phone']);
unset($order['delivery']['cost']);
unset($order['shipmentStore']);
unset($order['delivery']['address']);
unset($order['delivery']['data']);
break;
case "newpost":
unset($order['customer']);
unset($order['weight']);
unset($order['phone']);
unset($order['delivery']['cost']);
unset($order['shipmentStore']);
unset($order['delivery']['address']);
unset($order['delivery']['data']);
break;
default:
unset($order['firstName']);
unset($order['lastName']);
break;
}
unset($order['weight']);
unset($order['phone']);
unset($order['delivery']['cost']);
unset($order['shipmentStore']);
unset($order['delivery']['address']);
unset($order['delivery']['data']);
}
return $order;