N
N
Nikolay S.2018-09-18 13:22:34
1C-Bitrix
Nikolay S., 2018-09-18 13:22:34

How to transfer the delivery region to the site header?

For example, I have already displayed the delivery region in the site header using Bitrix ( https://camouf.ru/blog-note/6088/ ), I have the region ID, and sale.order.ajax defines it in its own way. How do I point the component to a user-defined region in advance? In the best case, the item "Delivery region" would be removed altogether (For example, how to hide it).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay S., 2019-03-12
@Nikolays93

Inspired by this article https://www.olegpro.ru/post/1c_bitriks_kastomizaci...
I realized that there was nowhere without crutches and came up with my own.
Added to CSS

#bx-soa-region {
    display: none !important;
}
#bx-soa-delivery .bx-soa-more-btn .pull-left {
    display: none !important;
}

and added to the clickNextAction method of the order_ajax.js file
if( 'bx-soa-region' == section.next.getAttribute('id') ) {
    this.show(section.next);

    jQuery(event.target).remove();

    var self = this;
    var $nextBtn = jQuery('.bx-soa-more-btn .pull-right', jQuery(section.next));
    $nextBtn.one('click', function(event) {
        self.clickNextAction(event);
    }).trigger('click');
    return;
}

before
this.fade(actionSection, section.next);
this.show(section.next);

Seems to work ;D

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question