Plugin Directory

Changeset 3171498


Ignore:
Timestamp:
10/18/2024 01:42:59 PM (18 months ago)
Author:
eshoplogistic
Message:

Обновление режима работы в корзине

Location:
eshoplogisticru/trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • eshoplogisticru/trunk/Modules/AssetsLoader.php

    r3032705 r3171498  
    113113                );
    114114                wp_enqueue_script(
     115                    'wc_esl_object_hash',
     116                    WC_ESL_PLUGIN_URL . 'assets/js/object_hash.js',
     117                    [],
     118                    WC_ESL_VERSION,
     119                    true
     120                );
     121                wp_enqueue_script(
    115122                    'wc_esl_checkout_frame_js_v2',
    116123                    WC_ESL_PLUGIN_URL . 'assets/js/checkout_frame_v2.js',
     
    119126                    true
    120127                );
     128                $this->injectGlobals('wc_esl_object_hash');
    121129                $this->injectGlobals('wc_esl_checkout_frame_js_v2');
    122130            }else{
  • eshoplogisticru/trunk/assets/js/checkout_frame_v2.js

    r3164990 r3171498  
    1010let cityMain = false
    1111let errorCity = 0
     12let hashSelectService = []
    1213
    1314function isHidden(el) {
     
    850851
    851852        },
    852         setTerminal: function (response) {
     853        setTerminal: function (response, hide = true) {
    853854            _self = this
    854855
     
    866867                    jQuery('#wc_esl_billing_terminal, #wc_esl_shipping_terminal').val(address.address);
    867868                    //jQuery(".wc-esl-terminals__button").text("Выбрать способ доставки и пункт самовывоза");
    868                     modalEsl.style.display = "none";
     869                    if(hide)
     870                        modalEsl.style.display = "none";
    869871                }
    870872            })
     
    906908        });
    907909
     910        root.addEventListener('eShopLogisticWidgetCart:onBalloonOpen', (event) => {
     911            let data = event.detail
     912            console.log('Событие onBalloonOpen', data)
     913            let hash = objectHash.sha1(data);
     914            hashSelectService = hash
     915
     916            if (typeof data.terminal == 'object') {
     917                esl.setTerminal(data.terminal, false)
     918            } else {
     919                jQuery('#wc_esl_billing_terminal, #wc_esl_shipping_terminal').val('');
     920                window.keyDelivery = data.typeDelivery
     921                let differentShippingAddress = jQuery('#ship-to-different-address-checkbox').is(':checked');
     922                let currentBillingCountry = (jQuery('#billing_country').val())?jQuery('#billing_country').val():'RU';
     923                let currentShippingCountry = (jQuery('#shipping_country').val())?jQuery('#shipping_country').val():'RU';
     924                if (window.keyDelivery === 'door') {
     925                    jQuery('#buttonModalDoor').show();
     926                } else {
     927                    jQuery('#buttonModalDoor').hide();
     928                }
     929
     930                changeVisibleElements(
     931                    differentShippingAddress,
     932                    window.keyDelivery,
     933                    currentBillingCountry,
     934                    currentShippingCountry
     935                );
     936
     937            }
     938        })
     939
    908940        root.addEventListener('eShopLogisticWidgetCart:onSelectedService', (event) => {
    909941            let data = event.detail
    910942            console.log('Событие onSelectedService', data)
     943            let hash = objectHash.sha1(event.detail);
     944            console.log(hash)
     945            console.log(hashSelectService)
     946
    911947            if (typeof data.terminal == 'object') {
    912948                esl.setTerminal(data.terminal)
     
    929965                    currentShippingCountry
    930966                );
    931 
    932             }
    933             esl.confirm(data)
     967            }
     968
     969            if(hash !== hashSelectService){
     970                esl.confirm(data)
     971            }
    934972        })
    935973
  • eshoplogisticru/trunk/readme.txt

    r3169130 r3171498  
    33Tags: доставка, eshoplogisticru, цена доставки, срок доставки, стоимость доставки, WooCommerce, сдэк, пэк, dostavista, picpoint, деловые линии, iml, boxberry, gtd, байкалсервис, сберлогистика, delivery, яндекс доставка
    44Requires at least: 5.3
    5 Tested up to: 5.8
    6 Stable tag: 2.1.32
     5Tested up to: 6.6
     6Stable tag: 2.1.33
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • eshoplogisticru/trunk/wc-eshop-logistic.php

    r3169130 r3171498  
    66 *
    77 * @link              https://wp.eshoplogistic.ru/
    8  * @since             2.1.32
     8 * @since             2.1.33
    99 * @package           WC_Eshop_Logistic
    1010 *
     
    1313 * Plugin URI:        https://wp.eshoplogistic.ru/
    1414 * Description:       Несколько служб доставки в одной интеграции: CDEK, DPD, Boxberry, IML, Почта России, Деловые Линии, ПЭК, Dostavista, GTD, Байкал Сервис и др.
    15  * Version:           2.1.32
     15 * Version:           2.1.33
    1616 * Author:            eShopLogistic
    1717 * Author URI:        https://eshoplogistic.ru/p747575
     
    4141define( 'WC_ESL_PLUGIN_DIR', plugin_dir_path(__FILE__) );
    4242
    43 define( 'WC_ESL_VERSION', '2.1.32' );
     43define( 'WC_ESL_VERSION', '2.1.33' );
    4444
    4545define( 'WC_ESL_DOMAIN', 'wc-esl' );
Note: See TracChangeset for help on using the changeset viewer.