Dobrý den,
v nové verzi budete muset použít jiný postup. V souboru
/classes/pdf/HTMLTemplateInvoice.php najděte tuto část kódu:
Kód:
$data = array(
'order' => $this->order,
'order_invoice' => $this->order_invoice,
'order_details' => $order_details,
'cart_rules' => $cart_rules,
'delivery_address' => $formatted_delivery_address,
'invoice_address' => $formatted_invoice_address,
'addresses' => array('invoice' => $invoice_address, 'delivery' => $delivery_address),
'tax_excluded_display' => $tax_excluded_display,
'display_product_images' => $display_product_images,
'layout' => $layout,
'tax_tab' => $this->getTaxTabContent(),
'customer' => $customer,
'footer' => $footer,
'ps_price_compute_precision' => _PS_PRICE_COMPUTE_PRECISION_,
'round_type' => $round_type,
'legal_free_text' => $legal_free_text,
);
a upravte ji na tvar (přidání 2 řádků):
Kód:
$first_message = $this->order->getFirstMessage(); // pridano kvuli poznamce
$data = array(
'order' => $this->order,
'order_invoice' => $this->order_invoice,
'order_details' => $order_details,
'cart_rules' => $cart_rules,
'delivery_address' => $formatted_delivery_address,
'invoice_address' => $formatted_invoice_address,
'addresses' => array('invoice' => $invoice_address, 'delivery' => $delivery_address),
'tax_excluded_display' => $tax_excluded_display,
'display_product_images' => $display_product_images,
'layout' => $layout,
'tax_tab' => $this->getTaxTabContent(),
'customer' => $customer,
'footer' => $footer,
'ps_price_compute_precision' => _PS_PRICE_COMPUTE_PRECISION_,
'round_type' => $round_type,
'legal_free_text' => $legal_free_text,
'first_message' => $first_message, // pridano kvuli poznamce
);
Případně se dá úprava řešit pomocí
Overriding a class.
V šabloně faktury
/pdf/invoice.tpl pak stačí na požadované pozici použít:
Kód:
{$first_message|escape:'html':'UTF-8'|nl2br}