Jump to content

use another HTMLTemplateInvoice and invoice.tpl


johnquitaneg

Recommended Posts

Hello Guys,

I'm new to Prestashop..

On orders, I duplicated  view invoice with view invoice int for international..

I already created HTMLTemplateInvoiceInt.php

added

const TEMPLATE_INVOICE_INT = 'InvoiceInt';

on PDF.php and

processGenerateInvoiceIntPdf()
generateInvoiceIntPDFByIdOrder()

on AdminPdfController.php

then use the template on generateInvoiceIntPDFByOrder()

$this->generatePDF($order_invoice_list, PDF::TEMPLATE_INVOICE_INT);

 

it is generating pdf but it still using the invoice.tpl (deleted cache)

I want to use other invoiceInt.tpl for this but I can't.

Please help. Thanks.

Link to comment
Share on other sites

Hello Johnquitanec,

There is absolutely  no need for any core changes. Store as many custom invoices as you want in

/themes/<yourtheme>/pdf

You can change the active invoice template in the Back Office drop down for the invoice template in:

Orders --> invoices

But you should be awarè that the invoice,tpl just gathers the other tpl files necessary for generating an invoice. 

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...