-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ffbb1f5
Showing
47 changed files
with
9,881 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea | ||
.DS_Store |
Large diffs are not rendered by default.
Oops, something went wrong.
566 changes: 566 additions & 0 deletions
566
2.3/upload/admin/controller/extension/shipping/apiship.php
Large diffs are not rendered by default.
Oops, something went wrong.
120 changes: 120 additions & 0 deletions
120
2.3/upload/admin/language/en-gb/extension/shipping/apiship.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<?php | ||
// Heading | ||
$_['heading_title'] = 'ApiShip shipping'; | ||
|
||
// Text | ||
$_['text_extension'] = 'Extensions'; | ||
$_['text_shipping'] = 'Shipping'; | ||
$_['text_success'] = 'Settings apiship module updated'; | ||
$_['text_url_callback'] = 'Order processing script'; | ||
$_['text_edit'] = 'Change ApiShip module settings'; | ||
$_['text_shipping_apiship_cron_url_copy'] = 'Copy'; | ||
$_['text_shipping_apiship_template'] = '%type %company %name %address (tariff: %tariff) %time'; | ||
$_['entry_shipping_apiship_group_points'] = 'All pickup points on one map'; | ||
|
||
// Entry | ||
$_['entry_shipping_apiship_token'] = 'Token'; | ||
$_['entry_shipping_apiship_title'] = 'Module title'; | ||
$_['entry_shipping_apiship_template'] = 'Module items template<br> | ||
<div style=\'font-weight:normal\'> | ||
<b>%type</b> - delivery type<br> | ||
<b>%company</b> - transport company<br> | ||
<b>%name</b> - pickup point name<br> | ||
<b>%address</b> - pickup point address<br> | ||
<b>%tariff</b> - tariff name<br> | ||
<b>%time</b> - delivery terms<br> | ||
</div>'; | ||
|
||
$_['entry_shipping_apiship_custom_code'] = 'customCode for the rate calculator'; | ||
$_['entry_shipping_apiship_include_fees'] = 'Add TC commission to delivery'; | ||
|
||
$_['entry_shipping_apiship_sending_country_code'] = 'Country'; | ||
$_['entry_shipping_apiship_sending_region'] = 'Region'; | ||
$_['entry_shipping_apiship_sending_city'] = 'City'; | ||
$_['entry_shipping_apiship_sending_street'] = 'Street'; | ||
$_['entry_shipping_apiship_sending_house'] = 'House'; | ||
$_['entry_shipping_apiship_sending_block'] = 'Building/Building'; | ||
$_['entry_shipping_apiship_sending_office'] = 'Office/Apartment'; | ||
|
||
$_['entry_country_ru'] = 'Russia'; | ||
|
||
$_['entry_shipping_apiship_contact_organization'] = 'Organization'; | ||
$_['entry_shipping_apiship_contact_name'] = 'Name'; | ||
$_['entry_shipping_apiship_contact_phone'] = 'Phone'; | ||
$_['entry_shipping_apiship_contact_email'] = 'Email'; | ||
|
||
$_['entry_shipping_apiship_parcel_length'] = 'Length (cm)'; | ||
$_['entry_shipping_apiship_parcel_width'] = 'Width (cm)'; | ||
$_['entry_shipping_apiship_parcel_height'] = 'Height (cm)'; | ||
$_['entry_shipping_apiship_parcel_weight'] = 'Weight (gr)'; | ||
|
||
$_['entry_shipping_apiship_sort_order'] = 'Sort order'; | ||
$_['entry_shipping_apiship_status'] = 'Status'; | ||
$_['entry_shipping_apiship_export_status'] = 'Status after export'; | ||
$_['entry_shipping_apiship_cancel_export_status'] = 'Status after canceling export'; | ||
$_['entry_shipping_apiship_export_title'] = 'Creating an order in Apiship'; | ||
$_['entry_shipping_apiship_cancel_export_title']= 'Cancellation of an order in Apiship'; | ||
$_['entry_shipping_apiship_label_title'] = 'Label'; | ||
$_['entry_shipping_apiship_waybill_title'] = 'Waybill'; | ||
|
||
|
||
$_['entry_shipping_apiship_pickup_type'] = 'Pickup type'; | ||
$_['entry_shipping_apiship_pickup_type1'] = 'Courier'; | ||
$_['entry_shipping_apiship_pickup_type2'] = 'Delivery to the warehouse'; | ||
|
||
$_['entry_shipping_apiship_place_dimensions'] = 'Place dimensions'; | ||
$_['entry_shipping_apiship_order_status'] = 'Order status'; | ||
|
||
$_['entry_shipping_apiship_rub_select'] = 'Ruble'; | ||
$_['entry_shipping_apiship_gr_select'] = 'Gr'; | ||
$_['entry_shipping_apiship_cm_select'] = 'Cm'; | ||
|
||
|
||
$_['entry_shipping_apiship_tax_class'] = 'Tax class'; | ||
$_['entry_shipping_apiship_geo_zone'] = 'Geo Zone'; | ||
|
||
$_['entry_shipping_apiship_icon_show'] = 'Show icon'; | ||
$_['entry_shipping_apiship_prefix'] = 'Order prefix'; | ||
|
||
$_['entry_shipping_apiship_mode'] = 'Working mode'; | ||
$_['entry_shipping_apiship_mode_normal'] = 'Normal'; | ||
$_['entry_shipping_apiship_mode_debug'] = 'Debug'; | ||
$_['entry_shipping_apiship_mode_test'] = 'Test'; | ||
|
||
$_['entry_main_settings'] = 'Main settings'; | ||
$_['entry_sending_address'] = 'Sending address'; | ||
$_['entry_contact_details'] = 'Contact details'; | ||
$_['entry_parcel_defaults'] = 'Parcel defaults'; | ||
$_['entry_extra_settings'] = 'Extra settings'; | ||
$_['entry_providers_points'] = 'DC points'; | ||
$_['entry_providers_point'] = 'DC point'; | ||
|
||
$_['entry_events_mapping'] = 'Status mapping table'; | ||
$_['entry_events_mapping_notify'] = 'Notify'; | ||
|
||
|
||
$_['entry_shipping_apiship_paid_orders'] = 'Statuses of paid orders'; | ||
$_['entry_shipping_apiship_cron_url'] = 'cron url:'; | ||
$_['entry_shipping_apiship_paid'] = ' (Paid) '; | ||
|
||
// Error | ||
$_['error_permission'] = 'You are not allowed to control this unit'; | ||
$_['error_shipping_apiship_token'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_sending_country'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_sending_region'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_sending_city'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_sending_street'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_sending_house'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_sending_address2'] = 'Fill the field!'; | ||
|
||
$_['error_shipping_apiship_contact_organization'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_contact_name'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_contact_phone'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_contact_email'] = 'Fill the field!'; | ||
|
||
$_['error_shipping_apiship_parcel_length'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_parcel_width'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_parcel_height'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_parcel_weight'] = 'Fill the field!'; | ||
$_['error_shipping_apiship_select_orders'] = 'Select orders!'; | ||
|
118 changes: 118 additions & 0 deletions
118
2.3/upload/admin/language/ru-ru/extension/shipping/apiship.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<?php | ||
// Heading | ||
$_['heading_title'] = 'Расчет доставки ApiShip'; | ||
|
||
// Text | ||
$_['text_extension'] = 'Расширения'; | ||
$_['text_shipping'] = 'Доставка'; | ||
$_['text_success'] = 'Настройки модуля обновлены!'; | ||
$_['text_url_callback'] = 'Скрипт обработки заказа'; | ||
$_['text_edit'] = 'Изменить настройки модуля ApiShip'; | ||
$_['text_shipping_apiship_cron_url_copy'] = 'Копировать'; | ||
$_['text_shipping_apiship_template'] = '%type %company %name %address (тариф: %tariff) %time'; | ||
$_['entry_shipping_apiship_group_points'] = 'Все ПВЗ на одной карте'; | ||
|
||
// Entry | ||
$_['entry_shipping_apiship_token'] = 'Токен'; | ||
$_['entry_shipping_apiship_title'] = 'Название модуля доставки'; | ||
$_['entry_shipping_apiship_template'] = 'Шаблон пунктов модуля доставки<br> | ||
<div style=\'font-weight:normal\'> | ||
<b>%type</b> - тип доставки<br> | ||
<b>%company</b> - транспортная компания<br> | ||
<b>%name</b> - название ПВЗ<br> | ||
<b>%address</b> - адрес ПВЗ<br> | ||
<b>%tariff</b> - название тарифа<br> | ||
<b>%time</b> - сроки доставки<br> | ||
</div>'; | ||
|
||
$_['entry_shipping_apiship_custom_code'] = 'customCode для калькулятора тарифов'; | ||
$_['entry_shipping_apiship_include_fees'] = 'Добавить в доставку комиссию ТК'; | ||
|
||
$_['entry_shipping_apiship_sending_country_code'] = 'Страна'; | ||
$_['entry_shipping_apiship_sending_region'] = 'Регион'; | ||
$_['entry_shipping_apiship_sending_city'] = 'Город'; | ||
$_['entry_shipping_apiship_sending_street'] = 'Улица'; | ||
$_['entry_shipping_apiship_sending_house'] = 'Дом'; | ||
$_['entry_shipping_apiship_sending_block'] = 'Строение/Корпус'; | ||
$_['entry_shipping_apiship_sending_office'] = 'Офис/Квартира'; | ||
|
||
$_['entry_country_ru'] = 'Россия'; | ||
|
||
$_['entry_shipping_apiship_contact_organization'] = 'Организация'; | ||
$_['entry_shipping_apiship_contact_name'] = 'ФИО отвественного лица'; | ||
$_['entry_shipping_apiship_contact_phone'] = 'Телефон'; | ||
$_['entry_shipping_apiship_contact_email'] = 'Email'; | ||
|
||
$_['entry_shipping_apiship_parcel_length'] = 'Длина (см)'; | ||
$_['entry_shipping_apiship_parcel_width'] = 'Ширина (см)'; | ||
$_['entry_shipping_apiship_parcel_height'] = 'Высота (см)'; | ||
$_['entry_shipping_apiship_parcel_weight'] = 'Вес (гр)'; | ||
|
||
$_['entry_shipping_apiship_sort_order'] = 'Порядок сортировки'; | ||
$_['entry_shipping_apiship_status'] = 'Статус'; | ||
$_['entry_shipping_apiship_export_status'] = 'Статус после экспорта'; | ||
$_['entry_shipping_apiship_cancel_export_status'] = 'Статус после отмены экспорта'; | ||
$_['entry_shipping_apiship_export_title'] = 'Создание заказа в Apiship'; | ||
$_['entry_shipping_apiship_cancel_export_title']= 'Отмена заказа в Apiship'; | ||
$_['entry_shipping_apiship_label_title'] = 'Ярлык'; | ||
$_['entry_shipping_apiship_waybill_title'] = 'Акт приема-передачи'; | ||
|
||
$_['entry_shipping_apiship_pickup_type'] = 'Тип забора груза'; | ||
$_['entry_shipping_apiship_pickup_type1'] = 'Курьер'; | ||
$_['entry_shipping_apiship_pickup_type2'] = 'Привоз на склад СД'; | ||
|
||
$_['entry_shipping_apiship_place_dimensions'] = 'Габариты места'; | ||
$_['entry_shipping_apiship_order_status'] = 'Статус заказа'; | ||
|
||
$_['entry_shipping_apiship_rub_select'] = 'Рубль'; | ||
$_['entry_shipping_apiship_gr_select'] = 'Грамм'; | ||
$_['entry_shipping_apiship_cm_select'] = 'Сантиметр'; | ||
|
||
$_['entry_shipping_apiship_tax_class'] = 'Налоговый класс'; | ||
$_['entry_shipping_apiship_geo_zone'] = 'Географическая зона'; | ||
|
||
$_['entry_shipping_apiship_icon_show'] = 'Показывать иконку'; | ||
$_['entry_shipping_apiship_prefix'] = 'Префикс номера заказа'; | ||
|
||
$_['entry_shipping_apiship_mode'] = 'Режим работы'; | ||
$_['entry_shipping_apiship_mode_normal'] = 'Нормальный'; | ||
$_['entry_shipping_apiship_mode_debug'] = 'Отладка'; | ||
$_['entry_shipping_apiship_mode_test'] = 'Тест'; | ||
|
||
$_['entry_main_settings'] = 'Основные настройки'; | ||
$_['entry_sending_address'] = 'Адрес отправления'; | ||
$_['entry_contact_details'] = 'Контактные данные'; | ||
$_['entry_parcel_defaults'] = 'Параметры товаров по умолчанию'; | ||
$_['entry_extra_settings'] = 'Дополнительные параметры'; | ||
$_['entry_providers_points'] = 'Параметры отгрузки в службы доставки'; | ||
$_['entry_providers_point'] = 'Привоз на склад'; | ||
|
||
$_['entry_events_mapping'] = 'Параметры сопоставления статусов'; | ||
$_['entry_events_mapping_notify'] = 'Оповестить'; | ||
|
||
|
||
$_['entry_shipping_apiship_paid_orders'] = 'Статусы оплаченных заказов'; | ||
$_['entry_shipping_apiship_cron_url'] = 'cron url:'; | ||
$_['entry_shipping_apiship_paid'] = ' (Оплачен) '; | ||
|
||
// Error | ||
$_['error_permission'] = 'У Вас нет прав для управления этим модулем!'; | ||
$_['error_shipping_apiship_token'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_sending_country'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_sending_region'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_sending_city'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_sending_street'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_sending_house'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_sending_address2'] = 'Необходимо заполнить поле!'; | ||
|
||
$_['error_shipping_apiship_contact_organization'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_contact_name'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_contact_phone'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_contact_email'] = 'Необходимо заполнить поле!'; | ||
|
||
$_['error_shipping_apiship_parcel_length'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_parcel_width'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_parcel_height'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_parcel_weight'] = 'Необходимо заполнить поле!'; | ||
$_['error_shipping_apiship_select_orders'] = 'Необходимо выбрать заказы!'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
require_once DIR_SYSTEM . 'library/apiship/apiship.php'; | ||
|
||
class ModelExtensionShippingApiship extends Model { | ||
|
||
private $apiship; | ||
|
||
public function __construct($params) { | ||
parent::__construct($params); | ||
$this->apiship_params = [ | ||
'shipping_apiship_rub_select' => $this->config->get('shipping_apiship_rub_select'), | ||
'shipping_apiship_gr_select' => $this->config->get('shipping_apiship_gr_select'), | ||
'shipping_apiship_cm_select' => $this->config->get('shipping_apiship_cm_select'), | ||
|
||
'shipping_apiship_token' => $this->config->get('shipping_apiship_token'), | ||
'shipping_apiship_mode' => $this->config->get('shipping_apiship_mode'), | ||
'shipping_apiship_provider' => $this->config->get('shipping_apiship_provider'), | ||
'shipping_apiship_prefix' => $this->config->get('shipping_apiship_prefix') | ||
]; | ||
$this->apiship = new Apiship($this->registry, $this->apiship_params, $this->log); | ||
} | ||
|
||
public function install() { | ||
|
||
$sql = "CREATE TABLE IF NOT EXISTS `".DB_PREFIX."apiship_order` ( "; | ||
$sql .= " `oc_order_id` int(11) NOT NULL,"; | ||
$sql .= " `apiship_order_id` int(11) NOT NULL,"; | ||
$sql .= " `status` int(11) DEFAULT NULL,"; | ||
$sql .= " UNIQUE KEY `oc_order_id` (`oc_order_id`) "; | ||
$sql .= ") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;"; | ||
$this->db->query($sql); | ||
|
||
$sql = "CREATE TABLE IF NOT EXISTS `".DB_PREFIX."apiship_order_status` ("; | ||
$sql .= " `id` int(11) NOT NULL AUTO_INCREMENT,"; | ||
$sql .= " `key` varchar(64) COLLATE utf8_unicode_ci NOT NULL,"; | ||
$sql .= " `name` text COLLATE utf8_unicode_ci NOT NULL,"; | ||
$sql .= " PRIMARY KEY (`id`),"; | ||
$sql .= " UNIQUE KEY `state_key` (`key`)"; | ||
$sql .= " ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"; | ||
$this->db->query($sql); | ||
|
||
|
||
} | ||
|
||
public function get_providers() { | ||
return $this->apiship->get_providers(); | ||
} | ||
|
||
public function get_providers_points() { | ||
return $this->apiship->get_providers_points(); | ||
} | ||
|
||
public function get_integrator_statuses() { | ||
return $this->apiship->get_integrator_statuses(); | ||
} | ||
|
||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.