Bitrix Site Manager

Printing order papers

In this section

  • Context bar
  • "Print documents" tab
  • Control buttons
  • Notes for administrators
  • The Print order papers form serves to print the documents (bills, invoices etc.) related to the orders made by the store customers. By using this form, you can print documents using both the predefined and your own templates.

    Context bar

    Button Description
    Orders Opens a list of orders.
    Edit order Opens a form in which you can edit the current order.
    Order details Opens a form with the detailed information about the current order.

    "Print documents" tab

    The Print documents tab displays the order summary.

    Order
    Order no. The order number (ID) in the system.
    Order date The date the order was placed or last modified.
    Site of order The site on which the order was placed.
    Status The current status of the order.
    Canceled / Paid / Delivery allowed The current order state.
    This section contains the list of order items.
    Include Name Quantity Price Amount
    [1] [2] [3] [4] [5]
    Field Description
    [1] Specifies whether this item is included in the print-out or not. Some templates permit only a part of order items to be printed. This field allows to specify items that are to be printed. If a template is not enabled for partial print-outs, all items will be printed.
    [2] The name of an order item (product).
    [3] Number of product units purchased.
    [4] Price of unit including discounts.
    [5] Total value of this order item.
    [tax] Taxes applied to the order, and their amounts.
    Delivery Cost of delivery of the order.
    Total Total order amount (including taxes and delivery).
    Document template Choose here the templates that are to be used for printing documents.

    Control buttons

    Button Description
    Print Click Print to generate the print-out form. The forms are opened in new windows. Some templates generate a special kind of forms in which some text can be edited (date, number etc.). When in the print-out form window, press Tab to highlight the editable fields.

    Notes for administrators

    Scripts containing the user templates should be stored in /bitrix/admin/reports/.

    Scripts containing the predefined templates should be stored in /bitrix/modules/sale/reports/.

    The system enumerates all the .php files from the above directories, and offers them as the print templates. If a user template has the same name as one of the predefined templates, the user template is used. The inner text of the <title> tag is displayed as the template name.

    If you are not satisfied by any of the predefined templates, copy it to the user template folder and correct it according to your goal. You can create as many user templates as you wish.

    Editable text areas in the print-out forms are the common input fields (input type="text") with no borders.

    Document template

    The document template is a PHP script. The following variables are available in scripts.

    VariableDescription
    $ORDER_ID The ID of the current order.
    $arOrder An array of order parameters (ID, delivery, cost, creation date, etc). For your version, you can obtain the contents of this array with the following call in the document template: print_r($arOrder).
    $arOrderProps An array of order properties. Order properties are defined on the order properties page of the e-Store module. Values of order properties are typed by customers when placing an order. The array has the following structure:
    array(
        "mnemonic code (or ID, 
         if the mnemonic code is empty) 
         of property" => 
        "property value"
    )
    $arBasketIDs An array of the order items (codes of the corresponding cart items) selected for printing. Developers are free to use or not use this array.
    $arQuantities An array of quantities of items in the order selected for printing. Elements of this array correspond to the $arBasketIDs array (that is, an item with the code $arBasketIDs[$i] has the quantity of $arQuantities[$i]). Developers are free to use or not use this array.

    The template display name is taken from the <title> tag. If the <title> tag has an optional attribute langs, the document template will be displayed only on sites whose names appear in the value of this parameter. For example, if the template has a string:

    <title langs="ru,en">Invoice</title>

    the template will have the name Invoice, and will be displayed only on the ru or en sites.