B
B
BiProg2018-06-06 10:07:14
1C-Bitrix
BiProg, 2018-06-06 10:07:14

How to expand the "Buyer" block in sale.order.ajax after selecting "Payer Type"?

Now when loading the checkout page (sale.order.ajax / D7), I have all the blocks open. But as soon as the "Payer Type" is changed, the "Buyer" block collapses, how to open the block after selecting the "Payer Type"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
OceanOfWisdom, 2019-07-26
@OceanOfWisdom

sale.order.ajax: expand all blocks.
.default template sale.order.ajax.
1. Activate editing of "Region" and "User" blocks:
Comment lines from 1694 to 1698

/*if (this.activeSectionId !== this.regionBlockNode.id)
  this.editFadeRegionContent(this.regionBlockNode.querySelector('.bx-soa-section-content'));

if (this.activeSectionId != this.propsBlockNode.id)
  this.editFadePropsContent(this.propsBlockNode.querySelector('.bx-soa-section-content'));*/

2. Remove the "Back" and "Next" buttons:
Comment lines from 2224 to 2234
/*node.appendChild(
  BX.create('DIV', {
    props: {className: 'row bx-soa-more'},
    children: [
      BX.create('DIV', {
        props: {className: 'bx-soa-more-btn col-xs-12'},
        children: buttons
      })
    ]
  })
);*/

3. Expand all blocks:
Change line 2461 from to line 4. Remove actions when clicking on headings: Comment lines from 2465 to 2478
/*BX.unbindAll(titleNode);
if (this.result.SHOW_AUTH)
{
  BX.bind(titleNode, 'click', BX.delegate(function(){
    this.animateScrollTo(this.authBlockNode);
    this.addAnimationEffect(this.authBlockNode, 'bx-step-good');
  }, this));
}
else
{
  BX.bind(titleNode, 'click', BX.proxy(this.showByClick, this));
  editButton = titleNode.querySelector('.bx-soa-editstep');
  editButton && BX.bind(editButton, 'click', BX.proxy(this.showByClick, this));
}*/

5. Remove the "Edit" links:
Add the following code to the end of the editOrder function on line 2404
var editSteps = this.orderBlockNode.querySelectorAll('.bx-soa-editstep'), i;
for (i in editSteps) {
  if (editSteps.hasOwnProperty(i)) {
    BX.remove(editSteps[i]);
    }
  }

A
Alexey, 2019-08-23
@gigamel

I hope the article on my site helps.
How to open sale.order.ajax blocks?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question