Jump to content

No logo on viewinvoice.php


nlundsten

Recommended Posts

Two things

 

1) When you visit my whmcs portal page, my custom logo is there, ONLY because I went and found

 

/templates/default/img/whmcslogo.png

 

and i renamed it to whmcslogo.png.backup

 

Then I dropped in my own logo as whmcslogo.png

 

so im guessing this is the wrong way to do it, if so can someone point me in the right direction for this?

 

2) My main issue is

 

I placed a test order, got to the paypal payment page and just cancelled it, it then returned me to

 

/viewinvoice.php?id=1&paymentfailed=true

 

which is fine, but the problem is that at the top left corner, it says my Company name.. but no logo

 

But if you just were to visit the WHMCS URL, the logo is there..

 

I gather I need to edit /templates/default/viewinvoice.tpl

 

But on the line it says

 

{if $logo}<p><img src="{$logo}" title="{$companyname}" /></p>{else}<h1>{$companyname}</h1>{/if}

 

I was going to erase {$logo} and put the physical LINK to the image.. but, Just seeing {$logo} suggests to me that its a variable thats defined already somewhere.. So couldnt i just edit what that variable is? or somewhere?

 

or let me know what is the best way to do this

 

Especially because it says if $logo, so that makes it sound like there is a logo defined somewhere

 

so advice on the best way to replace the logo would be great along w/ this invoice logo issue

 

I can easily restore the whmcslogo.png in /templates/default/img/

Link to comment
Share on other sites

  • 6 years later...
2 hours ago, ManagedCloud-Hosting said:

How do I remove this only from  - viewinvoice.php bur not from emails sent out ?

you could remove the logo from the HTML invoice using a hook...

<?php

function hook_view_invoice_remove_logo($vars) {
	
	return array("logo" => NULL);
}
add_hook('ClientAreaPageViewInvoice', 1, 'hook_view_invoice_remove_logo');

but if the logo doesn't exist (which the above hook ensures), the template will display the company name value instead (pulled from General Settings -> Company Name).

if you don't want the company name shown either, then you can just change the "return" line of code and null both variables...

	return array("logo" => NULL, "companyname" => NULL);

4xdyQv1.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated