sol2010 Posted August 9, 2011 Share Posted August 9, 2011 I am customising the PDF invoice and wondering if it is possible to add a direct link to the invoice, rather than just the client area... something like $html = '<a href="http://www.mydomain.com/clients/viewinvoice.php?id='.$invoicenum.'">click here to view invoice</a>'; Can anyone help with that? 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted August 9, 2011 Author Share Posted August 9, 2011 Doh - been trying to work this out for ages - and as soon as I post a question on the forum, I worked it out.... Pretty simple really: $pdf->Cell(0,0,"http://www.mydomain.com/clients/viewinvoice.php?id=".$invoicenum,0,1,'L','0'); 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted August 18, 2011 Share Posted August 18, 2011 Doh - been trying to work this out for ages - and as soon as I post a question on the forum, I worked it out.... Pretty simple really: $pdf->Cell(0,0,"http://www.mydomain.com/clients/viewinvoice.php?id=".$invoicenum,0,1,'L','0'); Doesn't the client still have to log in? Where do you place this? In the invoice email? 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted August 18, 2011 Author Share Posted August 18, 2011 Hi Yes, the client still must log in - but it is a direct link to that specific invoice. You can place it where you like - you can even put it in the email template if you want. I placed it in the invoicepdf.tpl template file like so : /////////////////////////////////////////////////// // show bank info only if unpaid if ($status=="Unpaid") { $pdf->SetFont('helvetica','B',15); $pdf->Cell(0,0,"Available Payment Methods: ",0,1,'L','0'); //Pay by: $pdf->Ln(); $pdf->SetFont('helvetica','',12); $pdf->Cell(0,0,"PayPal: ",0,1,'L','0'); //Pay by: $pdf->SetFont('helvetica','',10); $pdf->Cell(0,0,"To pay with PayPal (using either a Credit Card or your PayPal account balance), login here:",0,1,'L','0'); $pdf->Cell(0,0,"http://www.MYDOMAIN.com/WHMCS/viewinvoice.php?id=".$invoicenum,0,1,'L','0'); #ETC.... } // End of unpaid for payment details 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted August 19, 2011 Share Posted August 19, 2011 Isn't that link in the email which the PDF is attached to that gets sent to the client as well? 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted August 19, 2011 Author Share Posted August 19, 2011 not in mine - I had to make it manually with the above code 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.