mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-25 06:36:06 +03:00
v3.1.4
This commit is contained in:
parent
bca86cc51c
commit
9fb324188b
15
.env-dist
Normal file
15
.env-dist
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# OpenCart Database connection values
|
||||||
|
OC_DB_HOSTNAME=host
|
||||||
|
OC_DB_USERNAME=user
|
||||||
|
OC_DB_PASSWORD=pass
|
||||||
|
OC_DB_DATABASE=database
|
||||||
|
OC_DB_DRIVER=mysqli
|
||||||
|
|
||||||
|
# OpenCart Administration user
|
||||||
|
OC_USERNAME=admin
|
||||||
|
OC_PASSWORD=admin
|
||||||
|
OC_EMAIL=you@example.com
|
||||||
|
|
||||||
|
# Server Specification
|
||||||
|
SERVER_PORT=8000
|
||||||
|
SERVER_URL=http://localhost
|
@ -1,3 +1,6 @@
|
|||||||
|
## v.3.1.4
|
||||||
|
* Исправлена некорректная склейка типов доставки
|
||||||
|
|
||||||
## v.3.1.3
|
## v.3.1.3
|
||||||
* Добавлена активация модуля в маркетплейсе retailCRM
|
* Добавлена активация модуля в маркетплейсе retailCRM
|
||||||
|
|
||||||
|
@ -14,11 +14,10 @@ class ControllerApiRetailcrm extends Controller
|
|||||||
$this->load->library('retailcrm/retailcrm');
|
$this->load->library('retailcrm/retailcrm');
|
||||||
$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 = array_merge($response, $this->getDeliveryTypesByZones($country));
|
$response = $this->mergeDeliveryTypes($country);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -131,6 +130,21 @@ class ControllerApiRetailcrm extends Controller
|
|||||||
return $deliveryTypes;
|
return $deliveryTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function mergeDeliveryTypes($country) {
|
||||||
|
$result = array();
|
||||||
|
$delivery_types = $this->getDeliveryTypesByZones($country);
|
||||||
|
|
||||||
|
foreach ($delivery_types as $shipping_module => $shipping_type) {
|
||||||
|
if (isset($result[$shipping_module])) {
|
||||||
|
$result[$shipping_module] = array_merge($result[$shipping_module], $shipping_type);
|
||||||
|
} else {
|
||||||
|
$result[$shipping_module] = $shipping_type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
private function auth()
|
private function auth()
|
||||||
{
|
{
|
||||||
if (!isset($this->request->get['key'])
|
if (!isset($this->request->get['key'])
|
||||||
|
Loading…
Reference in New Issue
Block a user