Jump to content

Hide email preferences


lynaritic
Go to solution Solved by leemahoney3,

Recommended Posts

My business does not sell domains as we a SaaS provider and use WHMCS to help facilitate that. 

Under the client details and contacts page, there are email preferences  (image attached)

I would like to hide the preference regarding domains as its not required.

Can any advise how to do that please?

email-preferences.png

Link to comment
Share on other sites

  • Solution

Hi there,

Depending on your template, the change is fairly straightforward.

If using six:

  • templates/six/clientareadetails.tpl lines 139 - 145 change from
{foreach $emailPreferences as $emailType => $value}
    <label>
        <input type="hidden" name="email_preferences[{$emailType}]" value="0">
        <input type="checkbox" name="email_preferences[{$emailType}]" id="{$emailType}Emails" value="1"{if $value} checked="checked"{/if} />
        {lang key="emailPreferences."|cat:$emailType}
    </label>{if !($value@last)}<br />{/if}
{/foreach}

to

{foreach $emailPreferences as $emailType => $value}
	{if $emailType neq 'domain'}
		<label>
			<input type="hidden" name="email_preferences[{$emailType}]" value="0">
			<input type="checkbox" name="email_preferences[{$emailType}]" id="{$emailType}Emails" value="1"{if $value} checked="checked"{/if} />
			{lang key="emailPreferences."|cat:$emailType}
		</label>{if !($value@last)}<br />{/if}
	{/if}
{/foreach}

Same change will need to be made in account-contacts-manage.tpl (lines 103 to 109) and account-contacts-new.tpl (lines 108 to 114)

If using twenty-one theme, same files however the lines change:

  • clientareadetails.tpl - lines 149 to 155 
  • account-contacts-manage.tpl - lines 112 to 118
  • account-contacts-new.tpl - lines 117 to 123
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