mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-22 05:06:07 +03:00
Bug fix
This commit is contained in:
parent
9fb324188b
commit
bceb2069ac
@ -1,3 +1,6 @@
|
|||||||
|
## v.3.1.5
|
||||||
|
* Исправление ошибок
|
||||||
|
|
||||||
## v.3.1.4
|
## v.3.1.4
|
||||||
* Исправлена некорректная склейка типов доставки
|
* Исправлена некорректная склейка типов доставки
|
||||||
|
|
||||||
|
@ -15,9 +15,11 @@ class ControllerApiRetailcrm extends Controller
|
|||||||
$moduleTitle = $this->retailcrm->getModuleTitle();
|
$moduleTitle = $this->retailcrm->getModuleTitle();
|
||||||
$setting = $this->model_setting_setting->getSetting($moduleTitle);
|
$setting = $this->model_setting_setting->getSetting($moduleTitle);
|
||||||
|
|
||||||
|
$response = array();
|
||||||
|
|
||||||
if (isset($setting[$moduleTitle . '_country']) && $setting[$moduleTitle . '_country']) {
|
if (isset($setting[$moduleTitle . '_country']) && $setting[$moduleTitle . '_country']) {
|
||||||
foreach ($setting[$moduleTitle . '_country'] as $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;
|
return $deliveryTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function mergeDeliveryTypes($country) {
|
private function mergeDeliveryTypes($country, $result) {
|
||||||
$result = array();
|
|
||||||
$delivery_types = $this->getDeliveryTypesByZones($country);
|
$delivery_types = $this->getDeliveryTypesByZones($country);
|
||||||
|
|
||||||
foreach ($delivery_types as $shipping_module => $shipping_type) {
|
foreach ($delivery_types as $shipping_module => $shipping_type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user