Jump to content

Hide types of email settings


Recommended Posts

I think it's fantastic that WHMCS separated the types of emails so clients can fine-tune. Great feature.

I'm wondering if there's a way to hide some from the client area using a template's .tpl. IE We don't offer affiliate plans or domains. And would like to consolidate the Client portal down to the 4 remaining options.

Is this possible?

 

Thanks!

Link to comment
Share on other sites

6 hours ago, Metahuman Network said:

I'm wondering if there's a way to hide some from the client area using a template's .tpl. IE We don't offer affiliate plans or domains. And would like to consolidate the Client portal down to the 4 remaining options.

I know you don't use Six, but are you talking about the four tiles in the client area homepage ? (services/domains/quotes/affiliates/tickets/invoices) ?

Link to comment
Share on other sites

Hey brian! Thanks for the reply. I'm trying to hide the actual checkboxes. I was hoping they would hide when those features are disabled. Trying to consolidate down to the 4 that are checked in the screenshot. I can get them to display proper status individually by copying the contacts page and adjusting names/id's, but the page errors upon saving.

 

Possible? Just trying to minimize our client area as we only sell a handful of subscription services.

 

Thanks! 

Screen Shot 2020-05-06 at 9.10.10 AM.png

Link to comment
Share on other sites

21 minutes ago, Metahuman Network said:

Possible? Just trying to minimize our client area as we only sell a handful of subscription services.

oh those email types - must have had a mental block when I read the post earlier... 🙄

<?php

# Email Preferences Removal Hook
# Written by brian!

function email_preferences_removal_hook($vars) {
	
	$preferences = $vars['emailPreferences'];
	$emailPreferences = array_splice($preferences, 0, 4);
	return array("emailPreferences" => $emailPreferences);
}
add_hook("ClientAreaPageProfile", 1, "email_preferences_removal_hook");
add_hook("ClientAreaPageContacts", 1, "email_preferences_removal_hook");

the above hook should remove the last two items from that list and keep only the first four...

wnEXbC4.png

... and it should work on both the client details and contacts details pages.

you could achieve the same by editing the two templates, but hooking would be better.

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