Skip to content

Commit

Permalink
Merge pull request #120 from iyzoer/master
Browse files Browse the repository at this point in the history
v3.1.5
  • Loading branch information
gwinn authored Nov 2, 2018
2 parents 5b70033 + bceb206 commit 3e55de0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v.3.1.5
* Исправление ошибок

## v.3.1.4
* Исправлена некорректная склейка типов доставки

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.4
3.1.5
7 changes: 4 additions & 3 deletions src/upload/catalog/controller/api/retailcrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ public function getDeliveryTypes()
$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);
}
}
}
Expand Down Expand Up @@ -130,8 +132,7 @@ protected function getDeliveryTypesByZones($country_id)
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) {
Expand Down

0 comments on commit 3e55de0

Please sign in to comment.