Changeset 3179911
- Timestamp:
- 11/01/2024 11:54:59 AM (17 months ago)
- Location:
- eshoplogisticru/trunk
- Files:
-
- 1 added
- 8 edited
-
Classes/Shipping/ExportFileds.php (modified) (2 diffs)
-
Classes/Shipping/Methods/MagnitTerminal.php (added)
-
Modules/Ajax.php (modified) (2 diffs)
-
Modules/Unloading.php (modified) (3 diffs)
-
assets/js/settings_unloading.js (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
views/settings.php (modified) (1 diff)
-
views/unloading-button.php (modified) (1 diff)
-
wc-eshop-logistic.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eshoplogisticru/trunk/Classes/Shipping/ExportFileds.php
r3166450 r3179911 120 120 'order' => array( 121 121 'packing' => '' 122 ) 123 ); 124 } 125 126 if ( $name === 'magnit' ) { 127 $result = array( 128 'receiver' => array( 129 'last_name' => '' 130 ), 131 'order' => array( 132 'combine_places' => array( 133 'apply' => '', 134 'dimensions' => '', 135 'weight' => '' 136 ) 122 137 ) 123 138 ); … … 335 350 } 336 351 352 if ( $name === 'magnit' ) { 353 $optionsRepository = new OptionsRepository(); 354 $exportFormSettings = $optionsRepository->getOption('wc_esl_shipping_export_form'); 355 $result = array( 356 'receiver' => array( 357 'last_name||text||Фамилия получателя' => '' 358 ), 359 'order[combine_places]' => array( 360 'apply||checkbox||Объединить все грузовые места в одно' => ($exportFormSettings['combine-places-apply'] == 'on')?'checked':'', 361 'dimensions||text||Габариты итогового грузового места (Д*Ш*В)' => ($exportFormSettings['combine-places-dimensions'])??'', 362 'weight||text||Вес итогового грузового места в кг' => ($exportFormSettings['combine-places-weight'])??'' 363 ), 364 ); 365 } 366 337 367 return $result; 338 368 } -
eshoplogisticru/trunk/Modules/Ajax.php
r3149256 r3179911 73 73 add_action('wp_ajax_wc_esl_shipping_save_status_form', [$this, 'unloadingStatus']); 74 74 add_action('wp_ajax_wc_esl_shipping_unloading_status_update', [$this, 'unloadingStatusUpdate']); 75 add_action('wp_ajax_wc_esl_shipping_unloading_delete', [$this, 'unloadingDelete']); 76 75 77 } 76 78 … … 608 610 } 609 611 612 public function unloadingDelete() 613 { 614 if(!isset($_POST['order_id'])) 615 return false; 616 if(!isset($_POST['order_type'])) 617 return false; 618 619 620 $unloading = new Unloading(); 621 $result = $unloading->infoOrder($_POST['order_id'], $_POST['order_type'], 'delete'); 622 623 wp_send_json([ 624 'success' => true, 625 'data' => $result, 626 'msg' => __("Удаление заказа для выгрузки", WC_ESL_DOMAIN) 627 ]); 628 } 629 610 630 public function unloadingInfo() 611 631 { -
eshoplogisticru/trunk/Modules/Unloading.php
r3150114 r3179911 401 401 'Почта России' => 'postrf', 402 402 'ПЭК' => 'pecom', 403 'Магнит Пост' => 'magnit', 403 404 ); 404 405 … … 600 601 } 601 602 602 public function infoOrder( $id, $type ) {603 public function infoOrder( $id, $type, $action = 'get' ) { 603 604 604 605 $optionsRepository = new OptionsRepository(); … … 617 618 } 618 619 619 620 620 $data = array( 621 621 'key' => $apiKey, 622 'action' => 'get',622 'action' => $action, 623 623 'order_id' => $id, 624 624 'service' => $type -
eshoplogisticru/trunk/assets/js/settings_unloading.js
r3154034 r3179911 52 52 } 53 53 }, 54 clickOnDelete: function (event) { 55 let order_id = document.getElementById("order_info_id").value 56 let order_type = document.getElementById("order_info_type").value 57 const xhr = new XMLHttpRequest() 58 xhr.open("POST", wc_esl_shipping_global.ajaxUrl); 59 let params = 'action=wc_esl_shipping_unloading_delete&order_id='+order_id+'&order_type='+order_type; 60 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded') 61 xhr.send(params) 62 xhr.onload = () => { 63 let obj = JSON.parse(xhr.responseText); 64 console.log(obj) 65 } 66 }, 54 67 clickOnStatusUpdate: function (event) { 55 68 let order_id = document.getElementById("order_info_id").value … … 80 93 let els_terminals_info = document.getElementById('esl_unloading_status') 81 94 els_terminals_info.addEventListener('click', bindEvents.clickOnInfo, false) 95 96 let els_terminals_delete = document.getElementById('esl_unloading_delete') 97 if(els_terminals_delete) 98 els_terminals_delete.addEventListener('click', bindEvents.clickOnDelete, false) 82 99 83 100 let els_terminals_status_update = document.getElementById('esl_unloading_status_update') -
eshoplogisticru/trunk/readme.txt
r3174318 r3179911 4 4 Requires at least: 5.3 5 5 Tested up to: 6.6 6 Stable tag: 2.1.3 46 Stable tag: 2.1.35 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
eshoplogisticru/trunk/views/settings.php
r3166450 r3179911 974 974 <div class="input-group"> 975 975 <label for="" class="col-sm-4 col-form-label"> 976 <?php echo __( 'Код терминала (Магнит Пост)', WC_ESL_DOMAIN ) ?> 977 <label> 978 <div class="help-tip"> 979 <p> 980 Код терминала в случае самостоятельной доставки на 981 терминал транспортной компании. 982 Узнайте у своего менеджера. 983 </p> 984 </div> 985 </label> 986 </label> 987 <?php 988 $sender_terminal = ''; 989 if ( isset( $export_form['sender-terminal-magnit'] ) ) { 990 $sender_terminal = $export_form['sender-terminal-magnit']; 991 } 992 ?> 993 <input 994 type="text" 995 class="form-control" 996 placeholder="<?php echo __( 'Код терминала', WC_ESL_DOMAIN ) ?>" 997 name="sender-terminal-magnit" 998 class="col-sm-8" 999 value="<?php echo esc_attr( $sender_terminal ) ?>" 1000 /> 1001 </div> 1002 <div class="input-group"> 1003 <label for="" class="col-sm-4 col-form-label"> 976 1004 <?php echo __( 'Тип заказа (СДЭК)', WC_ESL_DOMAIN ) ?> 977 1005 </label> -
eshoplogisticru/trunk/views/unloading-button.php
r2930077 r3179911 22 22 <span class="dashicons dashicons-update-alt"></span> 23 23 </button> 24 <?php if(isset($_GET['eslD'])): ?> 25 <button type="button" id="esl_unloading_delete" class="button button-primary" title="Удалить выгрузку"> 26 <span class="dashicons dashicons-trash"></span> 27 </button> 28 <?php endif; ?> -
eshoplogisticru/trunk/wc-eshop-logistic.php
r3174318 r3179911 6 6 * 7 7 * @link https://wp.eshoplogistic.ru/ 8 * @since 2.1.3 48 * @since 2.1.35 9 9 * @package WC_Eshop_Logistic 10 10 * … … 13 13 * Plugin URI: https://wp.eshoplogistic.ru/ 14 14 * Description: Несколько служб доставки в одной интеграции: CDEK, DPD, Boxberry, IML, Почта России, Деловые Линии, ПЭК, Dostavista, GTD, Байкал Сервис и др. 15 * Version: 2.1.3 415 * Version: 2.1.35 16 16 * Author: eShopLogistic 17 17 * Author URI: https://eshoplogistic.ru/p747575 … … 41 41 define( 'WC_ESL_PLUGIN_DIR', plugin_dir_path(__FILE__) ); 42 42 43 define( 'WC_ESL_VERSION', '2.1.3 4' );43 define( 'WC_ESL_VERSION', '2.1.35' ); 44 44 45 45 define( 'WC_ESL_DOMAIN', 'wc-esl' );
Note: See TracChangeset
for help on using the changeset viewer.