Jump to content

Change Logo & Remove Accept Button from Quote Using Hook


Recommended Posts

23 hours ago, ManagedCloud-Hosting said:

I need to change change logo only for quotes

<?php

# ViewQuote Change Logo Hook
# Written by brian!

function hook_view_quote_change_logo($vars) {
	
	$otherlogo = "https://www.domain.com/whmcs/assets/img/otherlogo.png";
	return array("logo" => $otherlogo);
}
add_hook('ClientAreaPageViewQuote', 1, 'hook_view_quote_change_logo');

just change the URL and image filename to suit your needs.

23 hours ago, ManagedCloud-Hosting said:

also remove 'Accept Button' from Quote using hook

if the template supported using custom.css, then you could do that with one line of CSS code.... but it doesn't.... possibly that's a bug but 7.10 & 8 were the same, so probably just a (silly) design decision.

assuming this is for v8.1 and if you were using a child theme, then you could modify invoice.css with...

.payment-btn-container button[data-target="#acceptQuoteModal"] {display: none !important; }

and that should remove the button from the Quote page.... though if you were using a child theme, you could equally just modify the template not to include that output in the first place. 🙂

Link to comment
Share on other sites

Happy New Year !!  Praying to God For A Bright, Joyful & Love Filled 2021 For Everyone :)

 Thanks @brian!  will this remove the logo from pdf too ? Also if I also want to remove invoice pdf logo what should be done ? Many companies and individuals print invoices and printing the logo wastes ink and costs money so i want to remove the logos from both.

23 hours ago, brian! said:

just change the URL and image filename to suit your needs.

I am using default theme but would like to use custom as everytime I upgrade I lose all files I changed earlier. What would be the easiest way ?

23 hours ago, brian! said:

assuming this is for v8.1

 

 

Link to comment
Share on other sites

23 hours ago, ManagedCloud-Hosting said:

will this remove the logo from pdf too ?

no hook can remove the logo from the PDF - you would have to edit the template.

23 hours ago, ManagedCloud-Hosting said:

Many companies and individuals print invoices and printing the logo wastes ink and costs money so i want to remove the logos from both.

you could replace the logo used in either with a transparent image - that would avoid the need to edit the templates.

23 hours ago, ManagedCloud-Hosting said:

I am using default theme but would like to use custom as everytime I upgrade I lose all files I changed earlier. What would be the easiest way ?

probably to use a child theme.

Link to comment
Share on other sites

If I update a transparent image then while clients login how will they see our company logo ? Thanks 

1 hour ago, brian! said:

probably to use a child theme.


I will try reading about creating a child theme, hope it's not that tough :)

1 hour ago, brian! said:

you could replace the logo used in either with a transparent image - that would avoid the need to edit the templates.

 

Link to comment
Share on other sites

On 08/01/2021 at 18:13, ManagedCloud-Hosting said:

If I update a transparent image then while clients login how will they see our company logo ?

I was assuming that you weren't going to use the same logo for everything - e.g the above hook could be tweaked to change the logo for HTML invoices; for quote & invoice PDFs, if logo.png/jpg didn't exist, then it would use placeholder - if placeholder was replaced by a transparent image, then you wouldn't need to edit the PDF templates (though I suppose an update might replace placeholder.png) and you could use a hook to change the site logo if you had to.

all things are possible - you just need to think about what you want to do and code accordingly.

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