hide elements in invoice?

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
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 »

ok
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 »

good news: i think I´m already close to a solution. The only problem seems to be that somehow I cannot use the fpdf commands GetX() and GetY() in delivery.pdf.php while these commands are used in phoca.tcpdf.php wwithout problems. I´m really no programmer so I´m quite sure this is not a big issue but I need a hint... :)

here is my code which replaces the line

Code: Select all

$pdf->Cell(65,5,$db->f('order_item_name'),0,0,'L');

Code: Select all

$x = $this->GetX();
$y = $this->GetY();
$order_item_name = ereg_replace ("<br/>", "\n", $db->f("order_item_name") );
$order_item_name2 = $order_item_name . "\n";
$pdf->MultiCell(65,5,$pdf->unhtmlentities($order_item_name2),1,0,'L');
$pdf->Ln(5);
$x2 = $x + 65;
$this->SetXY($x2,$y);
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 »

??? why you cannot use GetX() and GetY()... do you use Joomla! 1.5, the tcpdf included these methods, so there should not be a problem ... ???

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 »

yes, I do, but somehow it´s not working. can you give it a try on your installation? simply replace the line of code I mentioned with my few lines of code. I get the error message, that getx() is an unknown method...!?
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 »

no idea , maybe try getX instead of getx ... but I think, this is not a problem ... :( ... no idea why tcpdf says the getX is unknown... :(
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 »

hmm...did you try it on your server and is it working?? if it would work this would be a very useful addition to your extension - I think there are more users with long article names... :)
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 »

no I didn't try it yet (because of my time :( )

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 »

is there anybody out there able to try this little hack on a VM installtion? I completly understand that Jan is short on time but hopefully there are others able and willing to help... :)
Post Reply