Jump to content

Recommended Posts

11 hours ago, Md Rasel Khan said:

Is there any way to auto select the domain configuration settings for DNS Management, ID Protection & Email Forwarding checkboxes by hook?

it's an expansion of the hook I posted in the thread below....

<?php

# Enable Domain Addons in Cart Hook
# Written by brian!

function enable_domain_addons_in_cart_hook($vars) {
	
	if ($vars['templatefile']=="configuredomains") {
		$domains = $vars['domains'];
		foreach ($domains as $key => $domain) {
			if ($domain['dnsmanagement'] == 1) {
				$domains[$key]['dnsmanagementselected'] = true;
			}
			if ($domain['emailforwarding'] == 1) {
				$domains[$key]['emailforwardingselected'] = true;
			}
			if ($domain['idprotection'] == 1) {
				$domains[$key]['idprotectionselected'] = true;
			}			
		}
		return array("domains" => $domains); 
	}
}
add_hook("ClientAreaPageCart", 1, "enable_domain_addons_in_cart_hook");
Link to comment
Share on other sites

  • 1 year later...

Forgive me for necro-ing this thread. I don't seem to even have any client facing Domain Configurations selection. I'm concerned that implementing this Hook may not do anything, considering the checkboxes don't even exist anywhere on the order form when users purchase a domain. Note, I am still able to enable them in the admin area or via MySQL. 

 

Will this hook help me, even though the options aren't on the order form? I really need all DNS management options enabled by default for all users who order domains.  I can't really test this (I don't think) without actually buying a domain and seeing if it enables the management settings. Thank you so much in advanced for any responses.  (@Brian - you're the man. I've searched out so many WHMCS questions only to have them answered by you in the forums. Thank you for your constant contributions.)

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.

×
×
  • 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