V
V
Vladimir2018-04-13 16:30:00
1C-Bitrix
Vladimir, 2018-04-13 16:30:00

How to make custom error handler in sale.order.ajax.js?

Hello. I'm doing checkbox processing in checkout. sale.order.ajax.
I use the article
https://mit24.ru/articles/gotovim-shtatnoe-oformle...
Only I have a little different

initAdditionalOptions: function() {
  var fz = BX('mitFZ');
  this.controlAdditionalOptions();
  BX.bind(fz, 'change', BX.proxy(this.controlAdditionalOptions, this));
},

controlAdditionalOptions: function() {
  var fz = BX('mitFZ');

  if (fz.checked == true) {
    BX.bind(this.orderSaveBlockNode.querySelector('a'), 'click', BX.proxy(this.clickOrderSaveAction, this));				
    BX.bind(this.totalBlockNode.querySelector('a'), 'click', BX.proxy(this.clickOrderSaveAction, this));
    BX.bind(this.mobileTotalBlockNode.querySelector('a'), 'click', BX.proxy(this.clickOrderSaveAction, this));
    BX.bind(this.totalInfoBlockNode.querySelector('a'), 'click', BX.proxy(this.clickOrderSaveAction, this));
    
  }
  else {
    BX.unbind(this.orderSaveBlockNode.querySelector('a'), 'click', BX.proxy(this.clickOrderSaveAction, this));
    BX.unbind(this.totalBlockNode.querySelector('a'), 'click', BX.proxy(this.clickOrderSaveAction, this));
    BX.unbind(this.mobileTotalBlockNode.querySelector('a'), 'click', BX.proxy(this.clickOrderSaveAction, this));
    BX.unbind(this.totalInfoBlockNode.querySelector('a'), 'click', BX.proxy(this.clickOrderSaveAction, this));

  }
}

I can’t output errors (I don’t understand which function to write where. Help, pliz.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question