A
A
Alexander2016-07-25 14:39:32
JavaScript
Alexander, 2016-07-25 14:39:32

How can I customize the output of errors in the Bitrix component sale.order.ajax?

In the standard component sale.order.ajax, errors are displayed in the block of the section that the user fills in, for example, if the buyer did not fill in his data, then errors will appear in the Buyer joxi.ru/KAg7BEJhgLyDxA block . As I understand it, the main part of the component's operation logic is placed in JS in the order_ajax.js file.
In my case, all blocks: Delivery region, Buyer, etc. are separate tabs, joxi.ru/MAj7BRehvPNN0r and joxi.ru/ZrJOkEjH1jx71m . When the buyer goes to the last stage and clicks the Checkout button, in the event that he did not fill out the data submitted at the first stage joxi.ru/MAj7BRehvPNN0rerrors appear but they are displayed on the Buyer fold, that is, in order to see them, you have to go back, this is not convenient. I want to make a special block above the tabs and errors will be displayed in it so that they are not tied to the tabs. But the problem is that the error output is hardwired to the sections of the form that I have displayed as tabs.
How can I make it so that errors are displayed in an arbitrary block? How can I override error output via JS using Bitrix JS library?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-07-25
@gangstarcj

Open the template and customize it however you like. There are both JS files and PHP, open it - look for where it is
ps is a new default template, not everyone has figured it out yet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question