From cf738976e9ada7698a9ad0393b502a4ac987a917 Mon Sep 17 00:00:00 2001 From: Antonov Sergey Date: Sun, 28 Apr 2024 11:19:38 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=B5=D1=80=D1=81=D0=B8=D1=8F=200.9.0=20?= =?UTF-8?q?=09-=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B?= =?UTF-8?q?=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D1=8B:=20=D0=9A=D0=B0=D0=B7?= =?UTF-8?q?=D0=B0=D1=85=D1=81=D1=82=D0=B0=D0=BD,=20=D0=91=D0=B5=D0=BB?= =?UTF-8?q?=D0=BE=D1=80=D1=83=D1=81=D1=81=D0=B8=D1=8F,=20=D0=9A=D0=B8?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B7=D0=B8=D1=8F=20=D0=B8=20=D0=90=D1=80?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B8=D1=8F=20=09-=20=D0=94=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=B2=D0=BE=D0=B7=D0=BC?= =?UTF-8?q?=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D1=83=D0=BA=D0=B0?= =?UTF-8?q?=D0=B7=D0=B0=D1=82=D1=8C=20=D0=98=D0=9D=D0=9D=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=BF=D0=B0=D0=BD=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2.1/install.xml | 2 +- .../admin/controller/shipping/apiship.php | 25 ++++++++++++++-- .../language/english/shipping/apiship.php | 8 ++++- .../language/russian/shipping/apiship.php | 8 ++++- .../admin/view/template/shipping/apiship.tpl | 10 +++++++ 2.1/upload/catalog/model/shipping/apiship.php | 29 ++++++++++--------- 2.1/upload/system/library/apiship/apiship.php | 1 + 2.3/install.xml | 2 +- .../controller/extension/shipping/apiship.php | 25 ++++++++++++++-- .../en-gb/extension/shipping/apiship.php | 8 ++++- .../ru-ru/extension/shipping/apiship.php | 8 ++++- .../template/extension/shipping/apiship.tpl | 10 +++++++ .../model/extension/shipping/apiship.php | 29 ++++++++++--------- 2.3/upload/system/library/apiship/apiship.php | 1 + 3.x/install.xml | 2 +- .../controller/extension/shipping/apiship.php | 25 ++++++++++++++-- .../en-gb/extension/shipping/apiship.php | 8 ++++- .../ru-ru/extension/shipping/apiship.php | 8 ++++- .../template/extension/shipping/apiship.twig | 10 +++++++ .../model/extension/shipping/apiship.php | 29 ++++++++++--------- 3.x/upload/system/library/apiship/apiship.php | 1 + CHANGELOG.md | 4 +++ 22 files changed, 196 insertions(+), 57 deletions(-) diff --git a/2.1/install.xml b/2.1/install.xml index 3133ece..bc44f29 100644 --- a/2.1/install.xml +++ b/2.1/install.xml @@ -2,7 +2,7 @@ ApiShip ApiShip - 0.8.9 (OpenCart 2.0 - 2.2) + 0.9.0 (OpenCart 2.0 - 2.2) ApiShip https://apiship.ru diff --git a/2.1/upload/admin/controller/shipping/apiship.php b/2.1/upload/admin/controller/shipping/apiship.php index 74280fc..2045cd8 100644 --- a/2.1/upload/admin/controller/shipping/apiship.php +++ b/2.1/upload/admin/controller/shipping/apiship.php @@ -48,7 +48,7 @@ public function index() { $data['text_none'] = $this->language->get('text_none'); $data['text_shipping_apiship_cron_url_copy'] = $this->language->get('text_shipping_apiship_cron_url_copy'); - $data['shipping_apiship_version'] = '0.8.9 (OpenCart 2.0 - 2.2)'; + $data['shipping_apiship_version'] = '0.9.0 (OpenCart 2.0 - 2.2)'; $data['shipping_apiship_version_js_mod'] = rand(); $data['button_save'] = $this->language->get('button_save'); @@ -67,6 +67,7 @@ public function index() { $data['entry_shipping_apiship_sending_office'] = $this->language->get('entry_shipping_apiship_sending_office'); $data['entry_shipping_apiship_contact_organization'] = $this->language->get('entry_shipping_apiship_contact_organization'); + $data['entry_shipping_apiship_contact_inn'] = $this->language->get('entry_shipping_apiship_contact_inn'); $data['entry_shipping_apiship_contact_name'] = $this->language->get('entry_shipping_apiship_contact_name'); $data['entry_shipping_apiship_contact_phone'] = $this->language->get('entry_shipping_apiship_contact_phone'); $data['entry_shipping_apiship_contact_email'] = $this->language->get('entry_shipping_apiship_contact_email'); @@ -128,7 +129,11 @@ public function index() { ]; $data['shipping_apiship_countries'] = [ - ['code'=>'RU', 'code_text'=>$this->language->get('entry_country_ru')] + ['code'=>'RU', 'code_text'=>$this->language->get('entry_country_ru')], + ['code'=>'KZ', 'code_text'=>$this->language->get('entry_country_kz')], + ['code'=>'BY', 'code_text'=>$this->language->get('entry_country_by')], + ['code'=>'KG', 'code_text'=>$this->language->get('entry_country_kg')], + ['code'=>'AM', 'code_text'=>$this->language->get('entry_country_am')] ]; $data['entry_shipping_apiship_pickup_type'] = $this->language->get('entry_shipping_apiship_pickup_type'); @@ -277,6 +282,12 @@ public function index() { $data['shipping_apiship_contact_organization'] = $this->config->get('shipping_apiship_contact_organization'); } + if (isset($this->request->post['shipping_apiship_contact_inn'])) { + $data['shipping_apiship_contact_inn'] = $this->request->post['shipping_apiship_contact_inn']; + } else { + $data['shipping_apiship_contact_inn'] = $this->config->get('shipping_apiship_contact_inn'); + } + if (isset($this->request->post['shipping_apiship_contact_name'])) { $data['shipping_apiship_contact_name'] = $this->request->post['shipping_apiship_contact_name']; } else { @@ -517,6 +528,12 @@ public function index() { $data['error_shipping_apiship_contact_organization'] = ''; } + if (isset($this->error['error_shipping_apiship_contact_inn'])) { + $data['error_shipping_apiship_contact_inn'] = $this->error['error_shipping_apiship_contact_inn']; + } else { + $data['error_shipping_apiship_contact_inn'] = ''; + } + if (isset($this->error['error_shipping_apiship_contact_name'])) { $data['error_shipping_apiship_contact_name'] = $this->error['error_shipping_apiship_contact_name']; } else { @@ -615,6 +632,10 @@ private function validate() { $this->error['error_shipping_apiship_contact_organization'] = $this->language->get('error_shipping_apiship_contact_organization'); } + //if (!$this->request->post['shipping_apiship_contact_inn']) { + // $this->error['error_shipping_apiship_contact_inn'] = $this->language->get('error_shipping_apiship_contact_inn'); + //} + if (!$this->request->post['shipping_apiship_contact_name']) { $this->error['error_shipping_apiship_contact_name'] = $this->language->get('error_shipping_apiship_contact_name'); } diff --git a/2.1/upload/admin/language/english/shipping/apiship.php b/2.1/upload/admin/language/english/shipping/apiship.php index d485d0f..c09735d 100644 --- a/2.1/upload/admin/language/english/shipping/apiship.php +++ b/2.1/upload/admin/language/english/shipping/apiship.php @@ -38,9 +38,15 @@ $_['entry_shipping_apiship_sending_block'] = 'Building/Building'; $_['entry_shipping_apiship_sending_office'] = 'Office/Apartment'; -$_['entry_country_ru'] = 'Russia'; +$_['entry_country_ru'] = 'Russian Federation'; +$_['entry_country_kz'] = 'Kazakhstan'; +$_['entry_country_by'] = 'Belarus'; +$_['entry_country_kg'] = 'Kyrgyzstan'; +$_['entry_country_am'] = 'Armenia'; + $_['entry_shipping_apiship_contact_organization'] = 'Organization'; +$_['entry_shipping_apiship_contact_inn'] = 'Organization EIN'; $_['entry_shipping_apiship_contact_name'] = 'Name'; $_['entry_shipping_apiship_contact_phone'] = 'Phone'; $_['entry_shipping_apiship_contact_email'] = 'Email'; diff --git a/2.1/upload/admin/language/russian/shipping/apiship.php b/2.1/upload/admin/language/russian/shipping/apiship.php index 862cecc..47a24c3 100644 --- a/2.1/upload/admin/language/russian/shipping/apiship.php +++ b/2.1/upload/admin/language/russian/shipping/apiship.php @@ -38,9 +38,15 @@ $_['entry_shipping_apiship_sending_block'] = 'Строение/Корпус'; $_['entry_shipping_apiship_sending_office'] = 'Офис/Квартира'; -$_['entry_country_ru'] = 'Россия'; +$_['entry_country_ru'] = 'Россия'; +$_['entry_country_kz'] = 'Казахстан'; +$_['entry_country_by'] = 'Беларусь'; +$_['entry_country_kg'] = 'Киргизия'; +$_['entry_country_am'] = 'Армения'; + $_['entry_shipping_apiship_contact_organization'] = 'Организация'; +$_['entry_shipping_apiship_contact_inn'] = 'ИНН компании'; $_['entry_shipping_apiship_contact_name'] = 'ФИО отвественного лица'; $_['entry_shipping_apiship_contact_phone'] = 'Телефон'; $_['entry_shipping_apiship_contact_email'] = 'Email'; diff --git a/2.1/upload/admin/view/template/shipping/apiship.tpl b/2.1/upload/admin/view/template/shipping/apiship.tpl index af27b49..e7396e4 100644 --- a/2.1/upload/admin/view/template/shipping/apiship.tpl +++ b/2.1/upload/admin/view/template/shipping/apiship.tpl @@ -247,6 +247,16 @@ +
+ +
+ + +
+ +
+
+
diff --git a/2.1/upload/catalog/model/shipping/apiship.php b/2.1/upload/catalog/model/shipping/apiship.php index fdfd7cc..8e09a18 100644 --- a/2.1/upload/catalog/model/shipping/apiship.php +++ b/2.1/upload/catalog/model/shipping/apiship.php @@ -18,6 +18,7 @@ public function __construct($params) { 'shipping_apiship_token' => $this->config->get('shipping_apiship_token'), 'shipping_apiship_contact_organization' => $this->config->get('shipping_apiship_contact_organization'), + 'shipping_apiship_contact_inn' => $this->config->get('shipping_apiship_contact_inn'), 'shipping_apiship_contact_name' => $this->config->get('shipping_apiship_contact_name'), 'shipping_apiship_contact_phone' => $this->config->get('shipping_apiship_contact_phone'), 'shipping_apiship_contact_email' => $this->config->get('shipping_apiship_contact_email'), @@ -175,7 +176,7 @@ private function getCartTotal() { } if ($end_total < 0) $end_total = $end_total + $shipping_cost; - return $end_total; + return $this->currency->convert($end_total,$this->config->get('config_currency'),$this->apiship_params['shipping_apiship_rub_select']); } private function check_geo_zone($address) { @@ -331,9 +332,9 @@ public function get_quote_list($address, $full_list = false) { $quote_data[$element['key']] = [ 'code' => 'apiship.' . $element['key'], 'title' => $title, - 'cost' => $element['deliveryCost'], + 'cost' => $this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($element['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; break; @@ -372,9 +373,9 @@ public function get_quote_list($address, $full_list = false) { $quote_data[$element['key']] = [ 'code' => 'apiship.' . $element['key'], 'title' => $title, - 'cost' => $element['deliveryCost'], + 'cost' => $this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($element['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; break; @@ -417,9 +418,9 @@ public function get_quote_list($address, $full_list = false) { $quote_data[$element['key']] = [ 'code' => 'apiship.' . $element['key'], 'title' => $title, - 'cost' => $element['deliveryCost'], + 'cost' => $this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($element['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; } @@ -477,9 +478,9 @@ public function get_quote_list($address, $full_list = false) { 'daysMax' => $tariff['daysMax'], 'tariffDescription' => $tariff['tariffDescription'] ]), - 'cost' => $tariff['deliveryCost'], + 'cost' => $this->currency->convert($tariff['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($tariff['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($tariff['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; } @@ -510,7 +511,7 @@ public function get_quote_list($address, $full_list = false) { 'title' => $title, 'cost' => 0, 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format(0, $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format(0, $this->session->data['currency']) ); } @@ -681,8 +682,8 @@ private function get_points_array($country, $region, $city, $postcode, $ext_addr 'daysMin' => $tariff['daysMin'], 'daysMax' => $tariff['daysMax'], - 'text' => $this->currency->format($this->tax->calculate($cost, $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']), - 'cost' => round($cost), + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']), + 'cost' => $this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'title' => $this->get_title([ 'template' => 'shipping_apiship_template', @@ -867,9 +868,9 @@ public function set_point() { $shipping_apiship = [ 'code' => $code, 'title' => $title, - 'cost' => $cost, + 'cost' => $this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($cost, $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; $select_points = $this->apiship->getData('shipping_apiship_select_points'); diff --git a/2.1/upload/system/library/apiship/apiship.php b/2.1/upload/system/library/apiship/apiship.php index 6b606c0..f144a93 100644 --- a/2.1/upload/system/library/apiship/apiship.php +++ b/2.1/upload/system/library/apiship/apiship.php @@ -463,6 +463,7 @@ public function apiship_order($order_params) { 'email' => $this->apiship_params['shipping_apiship_contact_email'],// Контактный email адрес 'phone' => $this->apiship_params['shipping_apiship_contact_phone'], // Контактный телефон 'companyName' => $this->apiship_params['shipping_apiship_contact_organization'],// Название компании + 'companyInn' => $this->apiship_params['shipping_apiship_contact_inn'],// ИНН компании 'contactName' => $this->apiship_params['shipping_apiship_contact_name'], // ФИО контактного лица 'countryCode' => $this->apiship_params['shipping_apiship_sending_country_code'], // Код страны в соответствии с ISO 3166-1 alpha-2 'region' => $this->apiship_params['shipping_apiship_sending_region'], // Область или республика или край diff --git a/2.3/install.xml b/2.3/install.xml index 64a027c..db29b8b 100644 --- a/2.3/install.xml +++ b/2.3/install.xml @@ -2,7 +2,7 @@ ApiShip ApiShip - 0.8.9 (OpenCart 2.3) + 0.9.0 (OpenCart 2.3) ApiShip https://apiship.ru diff --git a/2.3/upload/admin/controller/extension/shipping/apiship.php b/2.3/upload/admin/controller/extension/shipping/apiship.php index c3dfdee..451e4f4 100644 --- a/2.3/upload/admin/controller/extension/shipping/apiship.php +++ b/2.3/upload/admin/controller/extension/shipping/apiship.php @@ -47,7 +47,7 @@ public function index() { $data['text_none'] = $this->language->get('text_none'); $data['text_shipping_apiship_cron_url_copy'] = $this->language->get('text_shipping_apiship_cron_url_copy'); - $data['shipping_apiship_version'] = '0.8.9 (OpenCart 2.3)'; + $data['shipping_apiship_version'] = '0.9.0 (OpenCart 2.3)'; $data['shipping_apiship_version_js_mod'] = rand(); $data['button_save'] = $this->language->get('button_save'); @@ -66,6 +66,7 @@ public function index() { $data['entry_shipping_apiship_sending_office'] = $this->language->get('entry_shipping_apiship_sending_office'); $data['entry_shipping_apiship_contact_organization'] = $this->language->get('entry_shipping_apiship_contact_organization'); + $data['entry_shipping_apiship_contact_inn'] = $this->language->get('entry_shipping_apiship_contact_inn'); $data['entry_shipping_apiship_contact_name'] = $this->language->get('entry_shipping_apiship_contact_name'); $data['entry_shipping_apiship_contact_phone'] = $this->language->get('entry_shipping_apiship_contact_phone'); $data['entry_shipping_apiship_contact_email'] = $this->language->get('entry_shipping_apiship_contact_email'); @@ -127,7 +128,11 @@ public function index() { ]; $data['shipping_apiship_countries'] = [ - ['code'=>'RU', 'code_text'=>$this->language->get('entry_country_ru')] + ['code'=>'RU', 'code_text'=>$this->language->get('entry_country_ru')], + ['code'=>'KZ', 'code_text'=>$this->language->get('entry_country_kz')], + ['code'=>'BY', 'code_text'=>$this->language->get('entry_country_by')], + ['code'=>'KG', 'code_text'=>$this->language->get('entry_country_kg')], + ['code'=>'AM', 'code_text'=>$this->language->get('entry_country_am')] ]; $data['entry_shipping_apiship_pickup_type'] = $this->language->get('entry_shipping_apiship_pickup_type'); @@ -276,6 +281,12 @@ public function index() { $data['shipping_apiship_contact_organization'] = $this->config->get('shipping_apiship_contact_organization'); } + if (isset($this->request->post['shipping_apiship_contact_inn'])) { + $data['shipping_apiship_contact_inn'] = $this->request->post['shipping_apiship_contact_inn']; + } else { + $data['shipping_apiship_contact_inn'] = $this->config->get('shipping_apiship_contact_inn'); + } + if (isset($this->request->post['shipping_apiship_contact_name'])) { $data['shipping_apiship_contact_name'] = $this->request->post['shipping_apiship_contact_name']; } else { @@ -516,6 +527,12 @@ public function index() { $data['error_shipping_apiship_contact_organization'] = ''; } + if (isset($this->error['error_shipping_apiship_contact_inn'])) { + $data['error_shipping_apiship_contact_inn'] = $this->error['error_shipping_apiship_contact_inn']; + } else { + $data['error_shipping_apiship_contact_inn'] = ''; + } + if (isset($this->error['error_shipping_apiship_contact_name'])) { $data['error_shipping_apiship_contact_name'] = $this->error['error_shipping_apiship_contact_name']; } else { @@ -614,6 +631,10 @@ private function validate() { $this->error['error_shipping_apiship_contact_organization'] = $this->language->get('error_shipping_apiship_contact_organization'); } + //if (!$this->request->post['shipping_apiship_contact_inn']) { + // $this->error['error_shipping_apiship_contact_inn'] = $this->language->get('error_shipping_apiship_contact_inn'); + //} + if (!$this->request->post['shipping_apiship_contact_name']) { $this->error['error_shipping_apiship_contact_name'] = $this->language->get('error_shipping_apiship_contact_name'); } diff --git a/2.3/upload/admin/language/en-gb/extension/shipping/apiship.php b/2.3/upload/admin/language/en-gb/extension/shipping/apiship.php index d485d0f..c09735d 100644 --- a/2.3/upload/admin/language/en-gb/extension/shipping/apiship.php +++ b/2.3/upload/admin/language/en-gb/extension/shipping/apiship.php @@ -38,9 +38,15 @@ $_['entry_shipping_apiship_sending_block'] = 'Building/Building'; $_['entry_shipping_apiship_sending_office'] = 'Office/Apartment'; -$_['entry_country_ru'] = 'Russia'; +$_['entry_country_ru'] = 'Russian Federation'; +$_['entry_country_kz'] = 'Kazakhstan'; +$_['entry_country_by'] = 'Belarus'; +$_['entry_country_kg'] = 'Kyrgyzstan'; +$_['entry_country_am'] = 'Armenia'; + $_['entry_shipping_apiship_contact_organization'] = 'Organization'; +$_['entry_shipping_apiship_contact_inn'] = 'Organization EIN'; $_['entry_shipping_apiship_contact_name'] = 'Name'; $_['entry_shipping_apiship_contact_phone'] = 'Phone'; $_['entry_shipping_apiship_contact_email'] = 'Email'; diff --git a/2.3/upload/admin/language/ru-ru/extension/shipping/apiship.php b/2.3/upload/admin/language/ru-ru/extension/shipping/apiship.php index 862cecc..47a24c3 100644 --- a/2.3/upload/admin/language/ru-ru/extension/shipping/apiship.php +++ b/2.3/upload/admin/language/ru-ru/extension/shipping/apiship.php @@ -38,9 +38,15 @@ $_['entry_shipping_apiship_sending_block'] = 'Строение/Корпус'; $_['entry_shipping_apiship_sending_office'] = 'Офис/Квартира'; -$_['entry_country_ru'] = 'Россия'; +$_['entry_country_ru'] = 'Россия'; +$_['entry_country_kz'] = 'Казахстан'; +$_['entry_country_by'] = 'Беларусь'; +$_['entry_country_kg'] = 'Киргизия'; +$_['entry_country_am'] = 'Армения'; + $_['entry_shipping_apiship_contact_organization'] = 'Организация'; +$_['entry_shipping_apiship_contact_inn'] = 'ИНН компании'; $_['entry_shipping_apiship_contact_name'] = 'ФИО отвественного лица'; $_['entry_shipping_apiship_contact_phone'] = 'Телефон'; $_['entry_shipping_apiship_contact_email'] = 'Email'; diff --git a/2.3/upload/admin/view/template/extension/shipping/apiship.tpl b/2.3/upload/admin/view/template/extension/shipping/apiship.tpl index af27b49..e7396e4 100644 --- a/2.3/upload/admin/view/template/extension/shipping/apiship.tpl +++ b/2.3/upload/admin/view/template/extension/shipping/apiship.tpl @@ -247,6 +247,16 @@
+
+ +
+ + +
+ +
+
+
diff --git a/2.3/upload/catalog/model/extension/shipping/apiship.php b/2.3/upload/catalog/model/extension/shipping/apiship.php index ee3889d..46478fe 100644 --- a/2.3/upload/catalog/model/extension/shipping/apiship.php +++ b/2.3/upload/catalog/model/extension/shipping/apiship.php @@ -18,6 +18,7 @@ public function __construct($params) { 'shipping_apiship_token' => $this->config->get('shipping_apiship_token'), 'shipping_apiship_contact_organization' => $this->config->get('shipping_apiship_contact_organization'), + 'shipping_apiship_contact_inn' => $this->config->get('shipping_apiship_contact_inn'), 'shipping_apiship_contact_name' => $this->config->get('shipping_apiship_contact_name'), 'shipping_apiship_contact_phone' => $this->config->get('shipping_apiship_contact_phone'), 'shipping_apiship_contact_email' => $this->config->get('shipping_apiship_contact_email'), @@ -184,7 +185,7 @@ private function getCartTotal() { } if ($end_total < 0) $end_total = $end_total + $shipping_cost; - return $end_total; + return $this->currency->convert($end_total,$this->config->get('config_currency'),$this->apiship_params['shipping_apiship_rub_select']); } private function check_geo_zone($address) { @@ -340,9 +341,9 @@ public function get_quote_list($address, $full_list = false) { $quote_data[$element['key']] = [ 'code' => 'apiship.' . $element['key'], 'title' => $title, - 'cost' => $element['deliveryCost'], + 'cost' => $this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($element['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; break; @@ -381,9 +382,9 @@ public function get_quote_list($address, $full_list = false) { $quote_data[$element['key']] = [ 'code' => 'apiship.' . $element['key'], 'title' => $title, - 'cost' => $element['deliveryCost'], + 'cost' => $this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($element['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; break; @@ -426,9 +427,9 @@ public function get_quote_list($address, $full_list = false) { $quote_data[$element['key']] = [ 'code' => 'apiship.' . $element['key'], 'title' => $title, - 'cost' => $element['deliveryCost'], + 'cost' => $this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($element['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; } @@ -486,9 +487,9 @@ public function get_quote_list($address, $full_list = false) { 'daysMax' => $tariff['daysMax'], 'tariffDescription' => $tariff['tariffDescription'] ]), - 'cost' => $tariff['deliveryCost'], + 'cost' => $this->currency->convert($tariff['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($tariff['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($tariff['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; } @@ -519,7 +520,7 @@ public function get_quote_list($address, $full_list = false) { 'title' => $title, 'cost' => 0, 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format(0, $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format(0, $this->session->data['currency']) ); } @@ -690,8 +691,8 @@ private function get_points_array($country, $region, $city, $postcode, $ext_addr 'daysMin' => $tariff['daysMin'], 'daysMax' => $tariff['daysMax'], - 'text' => $this->currency->format($this->tax->calculate($cost, $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']), - 'cost' => round($cost), + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']), + 'cost' => $this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'title' => $this->get_title([ 'template' => 'shipping_apiship_template', @@ -876,9 +877,9 @@ public function set_point() { $shipping_apiship = [ 'code' => $code, 'title' => $title, - 'cost' => $cost, + 'cost' => $this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($cost, $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; $select_points = $this->apiship->getData('shipping_apiship_select_points'); diff --git a/2.3/upload/system/library/apiship/apiship.php b/2.3/upload/system/library/apiship/apiship.php index ad2809c..fb3e172 100644 --- a/2.3/upload/system/library/apiship/apiship.php +++ b/2.3/upload/system/library/apiship/apiship.php @@ -463,6 +463,7 @@ public function apiship_order($order_params) { 'email' => $this->apiship_params['shipping_apiship_contact_email'],// Контактный email адрес 'phone' => $this->apiship_params['shipping_apiship_contact_phone'], // Контактный телефон 'companyName' => $this->apiship_params['shipping_apiship_contact_organization'],// Название компании + 'companyInn' => $this->apiship_params['shipping_apiship_contact_inn'],// ИНН компании 'contactName' => $this->apiship_params['shipping_apiship_contact_name'], // ФИО контактного лица 'countryCode' => $this->apiship_params['shipping_apiship_sending_country_code'], // Код страны в соответствии с ISO 3166-1 alpha-2 'region' => $this->apiship_params['shipping_apiship_sending_region'], // Область или республика или край diff --git a/3.x/install.xml b/3.x/install.xml index fe56205..5699391 100644 --- a/3.x/install.xml +++ b/3.x/install.xml @@ -2,7 +2,7 @@ ApiShip ApiShip - 0.8.9 (OpenCart 3.x) + 0.9.0 (OpenCart 3.x) ApiShip https://apiship.ru diff --git a/3.x/upload/admin/controller/extension/shipping/apiship.php b/3.x/upload/admin/controller/extension/shipping/apiship.php index 5009298..a1c2c12 100644 --- a/3.x/upload/admin/controller/extension/shipping/apiship.php +++ b/3.x/upload/admin/controller/extension/shipping/apiship.php @@ -46,7 +46,7 @@ public function index() { $data['text_none'] = $this->language->get('text_none'); $data['text_shipping_apiship_cron_url_copy'] = $this->language->get('text_shipping_apiship_cron_url_copy'); - $data['shipping_apiship_version'] = '0.8.9 (OpenCart 3.x)'; + $data['shipping_apiship_version'] = '0.9.0 (OpenCart 3.x)'; $data['shipping_apiship_version_js_mod'] = rand(); $data['button_save'] = $this->language->get('button_save'); @@ -65,6 +65,7 @@ public function index() { $data['entry_shipping_apiship_sending_office'] = $this->language->get('entry_shipping_apiship_sending_office'); $data['entry_shipping_apiship_contact_organization'] = $this->language->get('entry_shipping_apiship_contact_organization'); + $data['entry_shipping_apiship_contact_inn'] = $this->language->get('entry_shipping_apiship_contact_inn'); $data['entry_shipping_apiship_contact_name'] = $this->language->get('entry_shipping_apiship_contact_name'); $data['entry_shipping_apiship_contact_phone'] = $this->language->get('entry_shipping_apiship_contact_phone'); $data['entry_shipping_apiship_contact_email'] = $this->language->get('entry_shipping_apiship_contact_email'); @@ -126,7 +127,11 @@ public function index() { ]; $data['shipping_apiship_countries'] = [ - ['code'=>'RU', 'code_text'=>$this->language->get('entry_country_ru')] + ['code'=>'RU', 'code_text'=>$this->language->get('entry_country_ru')], + ['code'=>'KZ', 'code_text'=>$this->language->get('entry_country_kz')], + ['code'=>'BY', 'code_text'=>$this->language->get('entry_country_by')], + ['code'=>'KG', 'code_text'=>$this->language->get('entry_country_kg')], + ['code'=>'AM', 'code_text'=>$this->language->get('entry_country_am')] ]; $data['entry_shipping_apiship_pickup_type'] = $this->language->get('entry_shipping_apiship_pickup_type'); @@ -275,6 +280,12 @@ public function index() { $data['shipping_apiship_contact_organization'] = $this->config->get('shipping_apiship_contact_organization'); } + if (isset($this->request->post['shipping_apiship_contact_inn'])) { + $data['shipping_apiship_contact_inn'] = $this->request->post['shipping_apiship_contact_inn']; + } else { + $data['shipping_apiship_contact_inn'] = $this->config->get('shipping_apiship_contact_inn'); + } + if (isset($this->request->post['shipping_apiship_contact_name'])) { $data['shipping_apiship_contact_name'] = $this->request->post['shipping_apiship_contact_name']; } else { @@ -515,6 +526,12 @@ public function index() { $data['error_shipping_apiship_contact_organization'] = ''; } + if (isset($this->error['error_shipping_apiship_contact_inn'])) { + $data['error_shipping_apiship_contact_inn'] = $this->error['error_shipping_apiship_contact_inn']; + } else { + $data['error_shipping_apiship_contact_inn'] = ''; + } + if (isset($this->error['error_shipping_apiship_contact_name'])) { $data['error_shipping_apiship_contact_name'] = $this->error['error_shipping_apiship_contact_name']; } else { @@ -614,6 +631,10 @@ private function validate() { $this->error['error_shipping_apiship_contact_organization'] = $this->language->get('error_shipping_apiship_contact_organization'); } + //if (!$this->request->post['shipping_apiship_contact_inn']) { + // $this->error['error_shipping_apiship_contact_inn'] = $this->language->get('error_shipping_apiship_contact_inn'); + //} + if (!$this->request->post['shipping_apiship_contact_name']) { $this->error['error_shipping_apiship_contact_name'] = $this->language->get('error_shipping_apiship_contact_name'); } diff --git a/3.x/upload/admin/language/en-gb/extension/shipping/apiship.php b/3.x/upload/admin/language/en-gb/extension/shipping/apiship.php index d485d0f..c09735d 100644 --- a/3.x/upload/admin/language/en-gb/extension/shipping/apiship.php +++ b/3.x/upload/admin/language/en-gb/extension/shipping/apiship.php @@ -38,9 +38,15 @@ $_['entry_shipping_apiship_sending_block'] = 'Building/Building'; $_['entry_shipping_apiship_sending_office'] = 'Office/Apartment'; -$_['entry_country_ru'] = 'Russia'; +$_['entry_country_ru'] = 'Russian Federation'; +$_['entry_country_kz'] = 'Kazakhstan'; +$_['entry_country_by'] = 'Belarus'; +$_['entry_country_kg'] = 'Kyrgyzstan'; +$_['entry_country_am'] = 'Armenia'; + $_['entry_shipping_apiship_contact_organization'] = 'Organization'; +$_['entry_shipping_apiship_contact_inn'] = 'Organization EIN'; $_['entry_shipping_apiship_contact_name'] = 'Name'; $_['entry_shipping_apiship_contact_phone'] = 'Phone'; $_['entry_shipping_apiship_contact_email'] = 'Email'; diff --git a/3.x/upload/admin/language/ru-ru/extension/shipping/apiship.php b/3.x/upload/admin/language/ru-ru/extension/shipping/apiship.php index 862cecc..47a24c3 100644 --- a/3.x/upload/admin/language/ru-ru/extension/shipping/apiship.php +++ b/3.x/upload/admin/language/ru-ru/extension/shipping/apiship.php @@ -38,9 +38,15 @@ $_['entry_shipping_apiship_sending_block'] = 'Строение/Корпус'; $_['entry_shipping_apiship_sending_office'] = 'Офис/Квартира'; -$_['entry_country_ru'] = 'Россия'; +$_['entry_country_ru'] = 'Россия'; +$_['entry_country_kz'] = 'Казахстан'; +$_['entry_country_by'] = 'Беларусь'; +$_['entry_country_kg'] = 'Киргизия'; +$_['entry_country_am'] = 'Армения'; + $_['entry_shipping_apiship_contact_organization'] = 'Организация'; +$_['entry_shipping_apiship_contact_inn'] = 'ИНН компании'; $_['entry_shipping_apiship_contact_name'] = 'ФИО отвественного лица'; $_['entry_shipping_apiship_contact_phone'] = 'Телефон'; $_['entry_shipping_apiship_contact_email'] = 'Email'; diff --git a/3.x/upload/admin/view/template/extension/shipping/apiship.twig b/3.x/upload/admin/view/template/extension/shipping/apiship.twig index b81e3f2..4bc1573 100644 --- a/3.x/upload/admin/view/template/extension/shipping/apiship.twig +++ b/3.x/upload/admin/view/template/extension/shipping/apiship.twig @@ -247,6 +247,16 @@
+
+ +
+ + {% if error_shipping_apiship_contact_inn %} +
{{ error_shipping_apiship_contact_inn }}
+ {% endif %} +
+
+
diff --git a/3.x/upload/catalog/model/extension/shipping/apiship.php b/3.x/upload/catalog/model/extension/shipping/apiship.php index 82e1070..799efef 100644 --- a/3.x/upload/catalog/model/extension/shipping/apiship.php +++ b/3.x/upload/catalog/model/extension/shipping/apiship.php @@ -18,6 +18,7 @@ public function __construct($params) { 'shipping_apiship_token' => $this->config->get('shipping_apiship_token'), 'shipping_apiship_contact_organization' => $this->config->get('shipping_apiship_contact_organization'), + 'shipping_apiship_contact_inn' => $this->config->get('shipping_apiship_contact_inn'), 'shipping_apiship_contact_name' => $this->config->get('shipping_apiship_contact_name'), 'shipping_apiship_contact_phone' => $this->config->get('shipping_apiship_contact_phone'), 'shipping_apiship_contact_email' => $this->config->get('shipping_apiship_contact_email'), @@ -185,7 +186,7 @@ private function getCartTotal() { } if ($end_total < 0) $end_total = $end_total + $shipping_cost; - return $end_total; + return $this->currency->convert($end_total,$this->config->get('config_currency'),$this->apiship_params['shipping_apiship_rub_select']); } private function check_geo_zone($address) { @@ -341,9 +342,9 @@ public function get_quote_list($address, $full_list = false) { $quote_data[$element['key']] = [ 'code' => 'apiship.' . $element['key'], 'title' => $title, - 'cost' => $element['deliveryCost'], + 'cost' => $this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($element['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; break; @@ -382,9 +383,9 @@ public function get_quote_list($address, $full_list = false) { $quote_data[$element['key']] = [ 'code' => 'apiship.' . $element['key'], 'title' => $title, - 'cost' => $element['deliveryCost'], + 'cost' => $this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($element['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; break; @@ -427,9 +428,9 @@ public function get_quote_list($address, $full_list = false) { $quote_data[$element['key']] = [ 'code' => 'apiship.' . $element['key'], 'title' => $title, - 'cost' => $element['deliveryCost'], + 'cost' => $this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($element['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($element['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; } @@ -487,9 +488,9 @@ public function get_quote_list($address, $full_list = false) { 'daysMax' => $tariff['daysMax'], 'tariffDescription' => $tariff['tariffDescription'] ]), - 'cost' => $tariff['deliveryCost'], + 'cost' => $this->currency->convert($tariff['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($tariff['deliveryCost'], $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($tariff['deliveryCost'], $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; } @@ -520,7 +521,7 @@ public function get_quote_list($address, $full_list = false) { 'title' => $title, 'cost' => 0, 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format(0, $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format(0, $this->session->data['currency']) ); } @@ -691,8 +692,8 @@ private function get_points_array($country, $region, $city, $postcode, $ext_addr 'daysMin' => $tariff['daysMin'], 'daysMax' => $tariff['daysMax'], - 'text' => $this->currency->format($this->tax->calculate($cost, $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']), - 'cost' => round($cost), + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']), + 'cost' => $this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'title' => $this->get_title([ 'template' => 'shipping_apiship_template', @@ -877,9 +878,9 @@ public function set_point() { $shipping_apiship = [ 'code' => $code, 'title' => $title, - 'cost' => $cost, + 'cost' => $this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), 'tax_class_id' => $this->apiship_params['shipping_apiship_tax_class_id'], - 'text' => $this->currency->format($this->tax->calculate($cost, $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->apiship_params['shipping_apiship_rub_select']) + 'text' => $this->currency->format($this->tax->calculate($this->currency->convert($cost, $this->apiship_params['shipping_apiship_rub_select'], $this->config->get('config_currency')), $this->apiship_params['shipping_apiship_tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) ]; $select_points = $this->apiship->getData('shipping_apiship_select_points'); diff --git a/3.x/upload/system/library/apiship/apiship.php b/3.x/upload/system/library/apiship/apiship.php index c3d0fa7..61c6590 100644 --- a/3.x/upload/system/library/apiship/apiship.php +++ b/3.x/upload/system/library/apiship/apiship.php @@ -463,6 +463,7 @@ public function apiship_order($order_params) { 'email' => $this->apiship_params['shipping_apiship_contact_email'],// Контактный email адрес 'phone' => $this->apiship_params['shipping_apiship_contact_phone'], // Контактный телефон 'companyName' => $this->apiship_params['shipping_apiship_contact_organization'],// Название компании + 'companyInn' => $this->apiship_params['shipping_apiship_contact_inn'],// ИНН компании 'contactName' => $this->apiship_params['shipping_apiship_contact_name'], // ФИО контактного лица 'countryCode' => $this->apiship_params['shipping_apiship_sending_country_code'], // Код страны в соответствии с ISO 3166-1 alpha-2 'region' => $this->apiship_params['shipping_apiship_sending_region'], // Область или республика или край diff --git a/CHANGELOG.md b/CHANGELOG.md index 1806069..96bcbb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.0 +* Добавлены страны: Казахстан, Белоруссия, Киргизия и Армения +* Добавлена возможность указать ИНН компании + ## 0.8.9 - 2024-04-12 * Mod Fix