M
M
MaxEpt2015-12-26 12:51:51
PHP
MaxEpt, 2015-12-26 12:51:51

How to print documents in Bitrix?

Good afternoon! After placing an order, the following set of documents is available for printing in the admin panel:
take.ms/zE6JMj - screenshot
In the public part, after placing an order, you must allow the user to print the invoice. How can I get a standard form? the one in the admin panel?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2016-01-15
@bitrixd

I can’t say how to get a standard form that is in the admin panel, but you can print it like this.

function printDiv() {
var divToPrint = document.getElementById('printArea');
var newWin = window.open('URL', 'print', params);
newWin.document.close();
newWin.focus();
newWin.print();
newWin.close();
}

or calling window.print() ; to print the current page

M
MaxEpt, 2016-01-15
@MaxEpt

Decided as follows:
Look in the admin panel for a script that generates a document for printing. From the url we understand that we need to give the ID of the generated order in the parameters. Well, with standard ajax we load it to the place we need on the page, and print it. I think it's correct.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question