codestyle fix
This commit is contained in:
parent
be771679b7
commit
722cb9aafb
2 changed files with 16 additions and 7 deletions
|
@ -604,4 +604,14 @@ class RetailcrmConfigProvider
|
|||
{
|
||||
return empty($value) && $value !== 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return integration_delivery option
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getCrmIntegrationDelivery()
|
||||
{
|
||||
return unserialize(COption::GetOptionString(RetailcrmConstants::MODULE_ID, RetailcrmConstants::CRM_INTEGRATION_DELIVERY, 0));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,13 +12,12 @@ class RetailCrmService
|
|||
*/
|
||||
public static function unsetIntegrationDeliveryFields(array $order): array
|
||||
{
|
||||
$integrationDelivery = unserialize(COption::GetOptionString(RetailcrmConstants::MODULE_ID, RetailcrmConstants::CRM_INTEGRATION_DELIVERY, 0));
|
||||
$deliveryCode = $order['delivery']['code'];
|
||||
|
||||
if ($deliveryCode) {
|
||||
|
||||
if (
|
||||
!empty($integrationDelivery[$deliveryCode])
|
||||
$integrationDelivery = RetailcrmConfigProvider::getCrmIntegrationDelivery();
|
||||
|
||||
if (isset($order['delivery']['code'])) {
|
||||
$deliveryCode = $order['delivery']['code'];
|
||||
|
||||
if (!empty($integrationDelivery[$deliveryCode])
|
||||
&& $integrationDelivery[$deliveryCode] !== 'sdek'
|
||||
&& $integrationDelivery[$deliveryCode] !== 'dpd'
|
||||
&& $integrationDelivery[$deliveryCode] !== 'newpost'
|
||||
|
|
Loading…
Add table
Reference in a new issue