hide elements in invoice?

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
matc
Phoca Member
Phoca Member
Posts: 14
Joined: 28 Jul 2008, 19:49

hide elements in invoice?

Post by matc »

hi there - great extension, but I have a question on it:
how can I hide some information from the PDF? there is for example no need to show the ammount of "rest" if it is "0" and I also don´t need to show the "default interest" to the customer.
And another problem: the font overlays in the columns and in the rows (if the name of the article is too long), how can I avoid this (see attached picture)?

thank you so much...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48041
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: hide elements in invoice?

Post by Jan »

Hi, all changes must be done in the code:

administrator\components\com_virtuemart\pdf\delivery.pdf.php
administrator\components\com_virtuemart\pdf\phoca.tcpdf.php

you can hide there unnecessary items or change e.g. cell to multicell (tcpdf framework shold be known)

Jan
If you find Phoca extensions useful, please support the project
matc
Phoca Member
Phoca Member
Posts: 14
Joined: 28 Jul 2008, 19:49

Re: hide elements in invoice?

Post by matc »

thank you very much for your reply - I´ll take a look at these files!

Is there a way to include automatic linebreaks for longer productnames?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48041
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: hide elements in invoice?

Post by Jan »

This should be made by multicell, see:

https://www.phoca.cz/documentation/index ... te-receipt

Point 2 (the using of multicell)

Jan
If you find Phoca extensions useful, please support the project
matc
Phoca Member
Phoca Member
Posts: 14
Joined: 28 Jul 2008, 19:49

Re: hide elements in invoice?

Post by matc »

Thanks for the quick reply - I just copied the code from the FAQ and pasted it into the file but nothing changed!?
How can I tell the script to do a linebreak after xxx characters? Of course the script should go back from the position until it reaches a space in order to avoid breaking words...
I´m not a coder so any help would be really appreciated! :)
matc
Phoca Member
Phoca Member
Posts: 14
Joined: 28 Jul 2008, 19:49

Re: hide elements in invoice?

Post by matc »

PS: I also didn´t manage to include product variation information like colors or size... :idea:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48041
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: hide elements in invoice?

Post by Jan »

this is very difficult in TCPDF, if the multicell is not working, then there is no way (except, if you will count the size of text, number of characters and you will do line breaks manually - you must find the space to do linebreak too... this is the solution about e.g. 100 rows of code :( )... :( :( :( so it is not possible to write such solution here ... :(
If you find Phoca extensions useful, please support the project
matc
Phoca Member
Phoca Member
Posts: 14
Joined: 28 Jul 2008, 19:49

Re: hide elements in invoice?

Post by matc »

how can I check if TCPDF is working correctly? the FAQ section is not very clear about how to add the product variation like colors, site etc. - would be great if you could help me with this, I´m sure that other users might be interested in something like this as well.
it´s really unbelieveable that a powerful tool like VM has no PDF invoice included...so keep up the great work! :)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48041
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: hide elements in invoice?

Post by Jan »

the FAQ section is not very clear about how to add -...
see BTW here:
viewtopic.php?f=1&t=1471&p=8146#p8122

I don't know VM perfectly, I only reworked the addon for 1.5 and added the PDF creating but I don't know where the product variation settings are :(

Jan
If you find Phoca extensions useful, please support the project
matc
Phoca Member
Phoca Member
Posts: 14
Joined: 28 Jul 2008, 19:49

Re: hide elements in invoice?

Post by matc »

ok, I try to figure it out by myself and let you know as soon as I found a solution...!
Post Reply