ManagedCloud-Hosting Posted January 5, 2021 Share Posted January 5, 2021 Hi @brian! I need to change change logo only for quotes and also remove 'Accept Button' from Quote using hook - Please help, Thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 6, 2021 Share Posted January 6, 2021 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. 🙂 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted January 7, 2021 Author Share Posted January 7, 2021 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 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 8, 2021 Share Posted January 8, 2021 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. 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted January 8, 2021 Author Share Posted January 8, 2021 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. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 11, 2021 Share Posted January 11, 2021 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. 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.