Changeset 3197499
- Timestamp:
- 11/26/2024 02:21:15 PM (16 months ago)
- Location:
- eshoplogisticru/trunk
- Files:
-
- 4 edited
-
Classes/Shipping/ExportFileds.php (modified) (2 diffs)
-
Modules/Unloading.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wc-eshop-logistic.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eshoplogisticru/trunk/Classes/Shipping/ExportFileds.php
r3182461 r3197499 171 171 ) 172 172 ) 173 ), 174 ); 175 } 176 177 if ( $name === 'dpd' ) { 178 $result = array( 179 'receiver' => array( 180 'email' => '' 181 ), 182 'order' => array( 183 'content' => '', 184 'costly' => '', 185 'combine_places' => array( 186 'apply' => '', 187 'dimensions' => '', 188 'weight' => '' 189 ) 190 ), 191 'delivery' => array( 192 'produce_date' => '', 193 'produce_time' => '', 194 'tariff' => '', 173 195 ), 174 196 ); … … 454 476 } 455 477 478 if ( $name === 'dpd'){ 479 $eshopLogisticApi = new EshopLogisticApi( new WpHttpClient() ); 480 $tariffs = $eshopLogisticApi->apiServiceTariffs( $name ); 481 $tariffs = $tariffs->data(); 482 $optionsRepository = new OptionsRepository(); 483 $exportFormSettings = $optionsRepository->getOption('wc_esl_shipping_export_form'); 484 $date = new DateTime(); 485 $date->modify('+1 day'); 486 $produce_date = $date->format('Y-m-d'); 487 if ( isset( $shippingMethods['tariff'] ) ) { 488 $selectedTariffCode = $shippingMethods['tariff']['code']; 489 if ( isset( $tariffs[ $selectedTariffCode ] ) ) { 490 $value[ $selectedTariffCode ] = $tariffs[ $selectedTariffCode ]; 491 unset( $tariffs[ $selectedTariffCode ] ); 492 $tariffs = $value + $tariffs; 493 } 494 } 495 496 $result = array( 497 'receiver' => array( 498 'email||text||Адрес электронной почты' => '' 499 ), 500 'order' => array( 501 'content||text||Содержимое отправления (что за товары)' => '', 502 'costly||checkbox||Флаг «Ценный груз»' => '', 503 ), 504 'order[combine_places]' => array( 505 'apply||checkbox||Объединить все грузовые места в одно' => ($exportFormSettings['combine-places-apply'] == 'on')?'checked':'', 506 'dimensions||text||Габариты итогового грузового места (Д*Ш*В)' => ($exportFormSettings['combine-places-dimensions'])??'', 507 'weight||text||Вес итогового грузового места в кг' => ($exportFormSettings['combine-places-weight'])??'' 508 ), 509 'delivery' => array( 510 'produce_date||date||Дата приёма груза' => $produce_date, 511 'produce_time||text||Интервал времени приёма груза (Пример: 9-18)' => '', 512 'tariff||select||Тариф' => $tariffs, 513 ), 514 ); 515 } 516 456 517 return $result; 457 518 } -
eshoplogisticru/trunk/Modules/Unloading.php
r3182966 r3197499 404 404 'Магнит Пост' => 'magnit', 405 405 'Байкал Сервис' => 'baikal', 406 'DPD' => 'dpd', 406 407 'Фулфилмент-оператор «Почтальон»' => 'pochtalion', 407 408 ); -
eshoplogisticru/trunk/readme.txt
r3196637 r3197499 4 4 Requires at least: 5.3 5 5 Tested up to: 6.6 6 Stable tag: 2.1. 396 Stable tag: 2.1.40 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
eshoplogisticru/trunk/wc-eshop-logistic.php
r3196637 r3197499 6 6 * 7 7 * @link https://wp.eshoplogistic.ru/ 8 * @since 2.1. 398 * @since 2.1.40 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. 3915 * Version: 2.1.40 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. 39' );43 define( 'WC_ESL_VERSION', '2.1.40' ); 44 44 45 45 define( 'WC_ESL_DOMAIN', 'wc-esl' );
Note: See TracChangeset
for help on using the changeset viewer.