avisonjohn Posted September 6, 2012 Share Posted September 6, 2012 OK, been searching for this but found nothing. I'm looking to purchase WHMCS owned non branded license, however I have a single issue I need to address first. Is it possible, with the quote and invoices, to select a different template? Ie, When emailing a quote or invoice, I want the invoice to include our logo, but in the admin section, I want to be able to download the quote/invoice without showing the logo so that we are able to print it out on our headed paper which will already include our logo. The reason I ask this, is that our headed paper is borderless, and it would be much easier (and cheaper) not to have to hae the logo and background printed from the PDF as this wont be borderless either. If this is possible, I'll happily purchase WHMCS, otherwise I will have to stick with our current solution. 0 Quote Link to comment Share on other sites More sharing options...
avisonjohn Posted September 7, 2012 Author Share Posted September 7, 2012 Anyone have any suggestions? Starting to wonder if this is the right section on the forum for this. 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted September 7, 2012 Share Posted September 7, 2012 WHMCS doesn't support multiple invoice templates but what you could do is edit the viewinvoice.tpl template file and add a conditional statement to look to see if an admin user is logged in and display things differently. e.g. the following would not add the logo if an admin user is accessing the view invoice page. # Logo if (!isset($_SESSION['adminid'])) { if (file_exists(ROOTDIR.'/images/logo.png')) $pdf->Image(ROOTDIR.'/images/logo.png',20,25,75); elseif (file_exists(ROOTDIR.'/images/logo.jpg')) $pdf->Image(ROOTDIR.'/images/logo.jpg',20,25,75); else $pdf->Image(ROOTDIR.'/images/placeholder.png',20,25,75); } 0 Quote Link to comment Share on other sites More sharing options...
avisonjohn Posted September 7, 2012 Author Share Posted September 7, 2012 WHMCS doesn't support multiple invoice templates but what you could do is edit the viewinvoice.tpl template file and add a conditional statement to look to see if an admin user is logged in and display things differently. e.g. the following would not add the logo if an admin user is accessing the view invoice page. # Logo if (!isset($_SESSION['adminid'])) { if (file_exists(ROOTDIR.'/images/logo.png')) $pdf->Image(ROOTDIR.'/images/logo.png',20,25,75); elseif (file_exists(ROOTDIR.'/images/logo.jpg')) $pdf->Image(ROOTDIR.'/images/logo.jpg',20,25,75); else $pdf->Image(ROOTDIR.'/images/placeholder.png',20,25,75); } Thats a brilliant idea, but I would want to be able to choose to download the invoice with or without the logo. Is there anyway, in the admin section where the invoice button is, that I can add an additional button next to it which opens the same link but maybe with an additional query string parameter and in the invoice template file, I can check to see if that parameter is set instead of checking if the admin is logged in. If this isnt possible (mainly due to the file being encrypted), does WHMCS offer any customisation/tweaking service in which they can simply add the button in and send the encrypted file over to me for a cost? 0 Quote Link to comment Share on other sites More sharing options...
avisonjohn Posted September 11, 2012 Author Share Posted September 11, 2012 Any more ideas? 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted September 11, 2012 Share Posted September 11, 2012 Only a few of the admin area templates can be changed an the invoice page is not one of them. What you could do is pass a variable in the URL to hide the logo. https://yourdomain.com/dl.php?type=i&id=1234&viewpdf=1&hidelogo=1 Then check for the variable in the invoicepdf.tpl and make sure they are an admin user if (!isset($_SESSION['adminid']) || ($_REQUEST['hidelogo'] != 1 && isset($_SESSION['adminid']))) { 0 Quote Link to comment Share on other sites More sharing options...
toby32 Posted July 13, 2013 Share Posted July 13, 2013 Anyone have any suggestions? Starting to wonder if this is the right section on the forum for this. My suggestion to you is to try ****http://www.fetchflow.com/invoice-templates. Here you will find all of your answer and you search has now been stopped. Lot of features and easy to customise and you can use it in your website, softwares and custom invoice templates. 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.