Changeset 3249790
- Timestamp:
- 03/03/2025 03:12:33 PM (13 months ago)
- Location:
- eshoplogisticru/trunk
- Files:
-
- 7 edited
-
Classes/Shipping/Base.php (modified) (3 diffs)
-
Classes/Shipping/Methods/CustomDoor.php (modified) (1 diff)
-
Classes/Shipping/Methods/CustomTerminal.php (modified) (1 diff)
-
Modules/Shipping.php (modified) (1 diff)
-
assets/js/checkout_frame_v2.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wc-eshop-logistic.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eshoplogisticru/trunk/Classes/Shipping/Base.php
r3174318 r3249790 71 71 function init_form_fields() { 72 72 $shippingHelper = new ShippingHelper(); 73 $options = $this->getOptionMethod($shippingHelper->getSlugMethod($this->id)); 74 75 $typeMethodTitle = ($shippingHelper->getTypeMethod($this->id) === 'terminal') ? 'Доставка до пункта выдачи' : 'Доставка курьером'; 73 $slug = $shippingHelper->getSlugMethod($this->id); 74 $options = $this->getOptionMethod($slug); 75 $typeMethod = $shippingHelper->getTypeMethod($this->id); 76 77 $typeMethodTitle = ($typeMethod === 'terminal') ? 'Доставка до пункта выдачи' : 'Доставка курьером'; 76 78 $defaultTitle = isset( $options['name'] ) ? $options['name'] . ': ' . $typeMethodTitle : ''; 77 79 78 $ this->instance_form_fields = array(80 $formFields = array( 79 81 'title' => array( 80 82 'title' => __('Название', WC_ESL_DOMAIN), … … 85 87 ); 86 88 87 89 if($slug == 'custom'){ 90 $option = $this->getOptionMethod($slug); 91 $optionsRepository = new OptionsRepository(); 92 $services = $optionsRepository->getOption('wc_esl_shipping_account_services'); 93 $optionCustom = array(); 94 foreach($services as $key => $service){ 95 $exCustom = explode('-', $key); 96 if($exCustom[0] == 'custom' && $service[$typeMethod]){ 97 $optionCustom[$key] = $service['name']; 98 } 99 } 100 $formFields['custom'] = array( 101 'title' => __('Кастомная доставка', WC_ESL_DOMAIN), 102 'type' => 'select', 103 'options' => $optionCustom, 104 'description' => __('Выберите тип кастомной доставки, которую вы создали в кабинете eShopLogistic', WC_ESL_DOMAIN), 105 ); 106 } 107 108 $this->instance_form_fields = $formFields; 88 109 } 89 110 … … 182 203 183 204 $data = new CheckoutOrderData($package['contents']); 205 206 if($service == 'custom'){ 207 $settingsService = $this->instance_settings; 208 if(isset($settingsService['custom']) && $settingsService['custom']){ 209 $service = $settingsService['custom']; 210 $this->id = WC_ESL_PREFIX . $settingsService['custom']. '_' . $this->type; 211 } 212 } 184 213 185 214 $cacheKey = str_replace( -
eshoplogisticru/trunk/Classes/Shipping/Methods/CustomDoor.php
r2872992 r3249790 23 23 $option = $this->getOptionMethod($slug); 24 24 25 $title = isset( $option['name'] ) ? $option['name'] . ': Доставка курьером' : ' ';25 $title = isset( $option['name'] ) ? $option['name'] . ': Доставка курьером' : 'Своя доставка: Доставка курьером'; 26 26 27 27 $this->id = WC_ESL_PREFIX . $slug . '_' . $type; 28 $this->method_title = isset( $option['name'] ) ? $option['name'] . ': Доставка курьером' : ' ';28 $this->method_title = isset( $option['name'] ) ? $option['name'] . ': Доставка курьером' : 'Своя доставка: Доставка курьером'; 29 29 $this->method_description = ''; 30 30 -
eshoplogisticru/trunk/Classes/Shipping/Methods/CustomTerminal.php
r2872992 r3249790 23 23 $option = $this->getOptionMethod($slug); 24 24 25 $title = isset( $option['name'] ) ? $option['name'] . ': Доставка до пункта выдачи' : ' ';25 $title = isset( $option['name'] ) ? $option['name'] . ': Доставка до пункта выдачи' : 'Своя доставка: Доставка до пункта выдачи'; 26 26 27 27 $this->id = WC_ESL_PREFIX . $slug . '_' . $type; 28 $this->method_title = isset( $option['name'] ) ? $option['name'] . ': Доставка до пункта выдачи' : ' ';28 $this->method_title = isset( $option['name'] ) ? $option['name'] . ': Доставка до пункта выдачи' : 'Своя доставка: Доставка до пункта выдачи'; 29 29 $this->method_description = ''; 30 30 -
eshoplogisticru/trunk/Modules/Shipping.php
r3174318 r3249790 37 37 }elseif(!empty($services)){ 38 38 foreach($services as $serviceKey => $service) { 39 $exCustom = explode('-', $serviceKey); 40 if($exCustom[0] == 'custom'){ 41 $serviceKey = 'custom'; 42 } 39 43 if($service['door'] == '1') { 40 44 $methods[ WC_ESL_PREFIX . strtolower($serviceKey) . '_door' ] = 'eshoplogistic\WCEshopLogistic\Classes\Shipping\Methods\\' . ucfirst(strtolower($serviceKey)) . 'Door'; -
eshoplogisticru/trunk/assets/js/checkout_frame_v2.js
r3239495 r3249790 918 918 let hash = objectHash.sha1(data); 919 919 hashSelectService = hash 920 console.log(hashSelectService)921 920 922 921 if (typeof data.terminal == 'object') { -
eshoplogisticru/trunk/readme.txt
r3239495 r3249790 3 3 Tags: доставка, eshoplogisticru, woocommerce, цена доставки, срок доставки, стоимость доставки, сдэк, пэк, dostavista, picpoint, деловые линии, iml, boxberry, gtd, байкалсервис, сберлогистика, delivery, яндекс доставка 4 4 Tested up to: 6.71 5 Stable tag: 2.1. 495 Stable tag: 2.1.50 6 6 License: GPLv2 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
eshoplogisticru/trunk/wc-eshop-logistic.php
r3239495 r3249790 6 6 * 7 7 * @link https://wp.eshoplogistic.ru/ 8 * @since 2.1. 498 * @since 2.1.50 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. 4915 * Version: 2.1.50 16 16 * Author: eShopLogistic 17 17 * Author URI: https://eshoplogistic.ru/p747575 … … 42 42 define( 'WC_ESL_PLUGIN_DIR', plugin_dir_path(__FILE__) ); 43 43 44 define( 'WC_ESL_VERSION', '2.1. 49' );44 define( 'WC_ESL_VERSION', '2.1.50' ); 45 45 46 46 define( 'WC_ESL_DOMAIN', 'wc-esl' );
Note: See TracChangeset
for help on using the changeset viewer.