This commit is contained in:
Akolzin Dmitry 2018-11-02 09:29:46 +03:00
parent 9fb324188b
commit bceb2069ac
3 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,6 @@
## v.3.1.5
* Исправление ошибок
## v.3.1.4
* Исправлена некорректная склейка типов доставки

View File

@ -1 +1 @@
3.1.4
3.1.5

View File

@ -15,9 +15,11 @@ class ControllerApiRetailcrm extends Controller
$moduleTitle = $this->retailcrm->getModuleTitle();
$setting = $this->model_setting_setting->getSetting($moduleTitle);
$response = array();
if (isset($setting[$moduleTitle . '_country']) && $setting[$moduleTitle . '_country']) {
foreach ($setting[$moduleTitle . '_country'] as $country) {
$response = $this->mergeDeliveryTypes($country);
$response = $this->mergeDeliveryTypes($country, $response);
}
}
}
@ -130,8 +132,7 @@ class ControllerApiRetailcrm extends Controller
return $deliveryTypes;
}
private function mergeDeliveryTypes($country) {
$result = array();
private function mergeDeliveryTypes($country, $result) {
$delivery_types = $this->getDeliveryTypesByZones($country);
foreach ($delivery_types as $shipping_module => $shipping_type) {