VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: lanthan on June 14, 2014, 13:33:08 PM

Title: pdf creation bug invoice, delivery note
Post by: lanthan on June 14, 2014, 13:33:08 PM
Hi,

VM2.6.6, J.2.5.22, PHP5.3

Under Shop->Invoice I inserted a .jpg for the header and a .jpg for the footer.

When I changed the footer edge (German: Brieffuß Rand) to 0mm, the footer picture didn´t appear anymore. But I wanted to have the footer picture starting at the bottom of my letter. I changed it back to 17mm. And the footer pic was shown correctly at bottom. Testing this with the preview link on top of the invoice configurator.

Now I went to orders and generated an invoice to test. The footer was gone again. Going back to Shop->Invoices and testing with the preview link, footer was gone. I did not change anything, but after generating the invoice, the footer is gone. Even I change parameters on the shop invoice configurator, it won´t show up again.

Both pictures are in the same folder. Both pictures are shown on the configurator page. So the links are ok. Both footer and header are published. No error appears.

I really despair at this issue.

Does anyone have an idea how to solve this problem?

Thanks in advance!

Frank
Title: Re: pdf creation bug invoice, delivery note
Post by: GJC Web Design on June 14, 2014, 13:56:05 PM
Must admit I have had real issues as well with pdf invoices loosing their config.. especially with multi-lingual shops

I notice you mention German so is yours multi-lingual?

if so on the Shop->shop->vendor tab have you selected all languages in turn - checking the Invoice tab for correct config and saved?

i.e. saved config in all languages - no idea if this matters - will hopefully find some time to investigate further with my problem site (vm2.0.26d)

Title: Re: pdf creation bug invoice, delivery note
Post by: lanthan on June 14, 2014, 15:39:13 PM
Hi,
thank you for your reply!
Yes it is a multi-language shop (de, en, fr, sp). I tried your idea and saved the configs in all languages but this did not help unfortunately :-( But this was a good advice anyway, because I didn´t see I have to save the header and footer content for every language. Thanks for that.

Does anyone has another idea to solve this?

Thanks!



Title: Re: pdf creation bug invoice, delivery note
Post by: lanthan on June 14, 2014, 16:24:14 PM
Big thanks to GJC Web Design, because he guided me to the right way.

I solved the problem and I know how this problem accurs.

You have to save the configs for every language, like GJC described. But it is an issue for your usual language, because it is already selected. This is the bug!!! You have to change the language to another language. Then change back to your usual language, in my case german. Now the german flags appear and now you can save your configs. Be aware that you see the flags. Only then the configs will be saved correctly.

Time to have a look at this VM Team ;-)
Title: Re: pdf creation bug invoice, delivery note
Post by: GJC Web Design on June 14, 2014, 16:41:59 PM
bit unclear as to your problem? That the jpg for the footer doesn't appear at all? even though configured?

the footer setting is stored in #__virtuemart_vendors_en_gb  etc column vendor_letter_footr_html
Title: Re: pdf creation bug invoice, delivery note
Post by: lanthan on June 14, 2014, 17:32:44 PM
No, now it appears, everything is fine.
Title: Re: pdf creation bug invoice, delivery note
Post by: GJC Web Design on June 14, 2014, 18:25:52 PM
Sorry - your reply came in as I was writing my reply - so understand now - yes - this is what I found as well.
The problem I guess could be solved with flags on the invoice tabs as well  - as it isn't obvious if you go straight to the invoice config tab that it is also multi-lingual.
Title: Re: pdf creation bug invoice, delivery note
Post by: lanthan on June 21, 2014, 09:22:02 AM
Meanwhile the error occured again. New customers ordered items and now the header and footer is gone again. I didn´t change anything. I´m getting crazy with that issue. Tried to save invoice layout for all languages again but this didn´t help this time.

I checked the database entries and everything is fine. #___virtuemart_vendor -> footer and header are set to "1"
#___virtuemart_vendor_en_gb and all other languages stored the correct link to the header and footer image.
Title: Re: pdf creation bug invoice, delivery note
Post by: lanthan on June 21, 2014, 10:08:09 AM
Solved the problem for the moment.

->
I tried to delete my test orders but I couldn´t delete all of them because meanwhile to the order date I changed payment and shipping stuff (deleted old methods). So there still some half-deleted test-orders in the order list. I deleted them by hand from the database and then the header and footer worked well again for the "real" orders. Don´t know if there are any realtionships but it is strange anyway.