Jump to content

[SOLVED] Misterious invoice PDF behaviour


Antakarana

Recommended Posts

Hi everybody!

 

I need to modify the invoice PDF files... 

 

I know that the PDF is based on the invoice.tpl and invoice-b2b.tpl files that can be found at the /PDF folder

 

The problem is that I'm unable to see any changes when I modify the invoice.tpl or invoice-b2b.tpl code.

 

That's what I do:

 

- I edit both invoice.tpl and invoice-b2b.tpl files

- Then I go to backoffice-->orders --> select an order --> print invoice PDF

- An invoice PDF file is created and downloaded to my PC... but I don't see any change on the resulting invoice PDF.

 

I decided to do some checks... So I first deleted both invoice.tpl and invoice-b2b.tpl files... After that I wasn't able to generate any PDF from backoffice. I just got a "missing file" error message. That was an expected behaviour.

 

Surprisingly, if I deleted the invoice.tpl code and I placed that empty invoice.tpl file at the /PDF folder, then I was still able to generate the invoice PDF :wacko:

 

How can it be possible to generate the PDF file if the TPL file has no code on it??? (notice this happens also with invoice-b2b.tpl file)...

 

So I'm getting crazy with that... 

 

I know there is an option at backoffice to use the hosting as a PDF cache, however that option is turned off... So it is not possible to be storing any PDF on cache.

 

What I'm doing wrong?  :huh:

 

Thanks for helping!

Edited by Antakarana (see edit history)
Link to comment
Share on other sites

Most likely you are changing the template files in the wrong directroy.

You might have the /pdf path in your shops root as well as in the path from your theme like /yourtheme/pdf/.

If the latter exists, it takes precedence over the files in the root based pdf - folder.

 

Report back.

Edited by Scully (see edit history)
Link to comment
Share on other sites

Most likely you are changing the template files in the wrong directroy.

You might have the /pdf path in your shops root as well as in the path from your theme like /yourtheme/pdf/.

If the latter exists, it takes precedence over the files in the root based pdf - folder.

 

Report back.

 

thanks for the answer.... 

 

I've already search for a theme/mytheme/pdf/ folder an it exist, however it has no TPL files on it  :( just a pair of PHP files....

Link to comment
Share on other sites

In that case your changes are not applied du to another reason. Since you haven't described your changes, it's difficult to help.

We usually start with simply putting in some extra text as plain text. No variables. Just text. With this approach you can proove it this text appears. Variables instead could be empty. So even when you put them in somewhere, you might see nothing.

Link to comment
Share on other sites

Hi,

 

I think I've found the reason of the misterious behaviour... there was a new module istalled by the customer who do some changes on the invoices to add a new special tax.

 

So on the module/specialmodule/override folder there are a pair of PHP files related with the invoice template....

 

I think there is where I should check it :)

 

thanks for helping!

Link to comment
Share on other sites

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...