Jump to content

Where can i find template file for invoices?


Recommended Posts

Hi Housy,

If you are talking about the pdf template for the invoices there is no actual template file like in the theme. You can however modify the pdf classe that generates the pdfs. The class is in admin/PDF.php around line 349 you should find the invoice function that deals with creating the pdf layout.

Be careful to note every modifications though has every update of Presta you will do will wipe out your changes.

Link to comment
Share on other sites

Hi Housy,

If you are talking about the pdf template for the invoices there is no actual template file like in the theme. You can however modify the pdf classe that generates the pdfs. The class is in admin/PDF.php around line 349 you should find the invoice function that deals with creating the pdf layout.

Be careful to note every modifications though has every update of Presta you will do will wipe out your changes.


Ben tnx man, but the problem here is that i have no clue where to start, because it's pure php code and i'm a designer. I've found the invoice footer section, but i don't know how to add some extra text at the bottom.

In the attachment is the picture of what excatly i had in mind.

I'd be grateful if anyone could help me.

Thank you,
Housy

15193_nxjbDjqGWWIx70TrIxk0_t

Link to comment
Share on other sites

I've done some testing and the cell function works as follow:

//function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
$this->Cell(150, 10, 'This is some custom text, static unfortunatly', 0, 0, 'C');
$this->Ln(9);


This will create a cell 150px wide, 10px tall, with the content 'This is some custom text, static unfortunatly' in it and 'C' for centered. (the commented line is just to show what parameters the function is expecting).

Then Ln(9) creates a line after the cell you have just created to live some space under it.

Link to comment
Share on other sites

I've done some testing and the cell function works as follow:
//function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
$this->Cell(150, 10, 'This is some custom text, static unfortunatly', 0, 0, 'C');
$this->Ln(9);


This will create a cell 150px wide, 10px tall, with the content 'This is some custom text, static unfortunatly' in it and 'C' for centered. (the commented line is just to show what parameters the function is expecting).

Then Ln(9) creates a line after the cell you have just created to live some space under it.



I. I recomend to see the doc in the fpdf web.

http://www.fpdf.org/
Link to comment
Share on other sites

I've done some testing and the cell function works as follow:
//function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
$this->Cell(150, 10, 'This is some custom text, static unfortunatly', 0, 0, 'C');
$this->Ln(9);


This will create a cell 150px wide, 10px tall, with the content 'This is some custom text, static unfortunatly' in it and 'C' for centered. (the commented line is just to show what parameters the function is expecting).

Then Ln(9) creates a line after the cell you have just created to live some space under it.



Tnx man, i still have one question, i have characters like ž, č and š and i have to use utf-8 otherwise they wont be seen on monitor.

I tryed with the code below but i wasn't succesfull
//function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
$this->Cell(150, 10, Tools::iconv('utf-8', self::encoding(), self::1('Copyright © 2009 Ervin Gril s.p., vse pravice pridržane.'), 0, 0, 'C'));
$this->Ln(9);



Could you please be so kind and tell me where exactly (what line) should i put that code?

Thanks a lot,
Housy

Link to comment
Share on other sites

  • 1 month later...
  • 2 months 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...