Anders Posted March 16, 2020 Share Posted March 16, 2020 Hi guys, is it possible setup that hosting is required when customer chosen a domain name? now is possible to buy a domain name only? i think it was somewhere that it could be changed in the settings but i can find it. any ideas? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted March 16, 2020 Share Posted March 16, 2020 Maybe this will help: 0 Quote Link to comment Share on other sites More sharing options...
Anders Posted March 16, 2020 Author Share Posted March 16, 2020 Hi, what i want achieve that customer still can register, transfer, use their own domain and use of subdomain if exist. so now hen they add a new domain they can order it with out hosting how can i stop that? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 16, 2020 Share Posted March 16, 2020 29 minutes ago, Anders said: i think it was somewhere that it could be changed in the settings but i can find it. any ideas? you can disable the register/transfer/own domain options from the settings - but unticking them will remove both from hosting options and direct options. https://docs.whmcs.com/Domains_Tab#Domain_Registration_Options Quote Unticking these options will hide the associated option from the order form. For example if you do not wish customers to transfer domain names to you, unticking the checkbox will remove the option from the order form. When all options are unticked the Choose a Domain domain checker will also be removed from the default template homepage. you could modify a hook I posted in the thread below, removing the first four $ lines and the latter half of the if statement and that would redirect anyone visiting the domain register page directly elsewhere... you'll probably also need to remove the links from the sidebar/navbar with a hook, and I will have posted those hooks before too. there's a 7-year old request that I think the above hook would solve too (or at least could be made to). https://requests.whmcs.com/topic/option-to-disallow-domain-registration-without-a-hosting-account 0 Quote Link to comment Share on other sites More sharing options...
Magicklug Posted March 17, 2020 Share Posted March 17, 2020 Awesome, thank you for posting your answers, I need the same help. 0 Quote Link to comment Share on other sites More sharing options...
Anders Posted March 17, 2020 Author Share Posted March 17, 2020 Hi guys, nice hook and thx Brian for your amazing quick answers, but i wonder if is possible after user have chosen a domain/added to cart then the checkout button goes to add a hosting? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 17, 2020 Share Posted March 17, 2020 2 hours ago, Anders said: but i wonder if is possible after user have chosen a domain/added to cart then the checkout button goes to add a hosting? you mean to the domain configuration page? it should go there if it has reason to, e.g some additional domain configuration is required, ADF, DNS/whois privacy/forwarding/ etc 0 Quote Link to comment Share on other sites More sharing options...
Anders Posted March 17, 2020 Author Share Posted March 17, 2020 sorry for bad explanation please see screenshot. If NO hosting: 1. Not possible to continue 2. or showing hosting plans before this page 3. or showing hosting plans more prominent on this page 4. and can i remove name server thing? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 17, 2020 Share Posted March 17, 2020 I think it's simpler to just prevent them from going to the domain register page, but let's go down the other roads if you want to... 😨 57 minutes ago, Anders said: 1. Not possible to continue... 4. and can i remove name server thing? you could edit the configuredomains.tpl template and remove the {if $atleastonenohosting} block of code and the continue div beneath it... however, by this stage, the domain is already in the cart, so they could just go to view cart/checkout and complete without buying hosting. you could write a hook that validated the cart contents at checkout and if there are no products and only domains, display an error message and prevent the order from completing... or edit the checkout template and disable the "Complete Order" button if there are no products in the cart... {if $cartitems==0 OR $products|@count==0}disabled="disabled"{/if} 1 hour ago, Anders said: 2. or showing hosting plans before this page the beast is what it is and you can't easily splice new steps into the cart process... 1 hour ago, Anders said: 3. or showing hosting plans more prominent on this page again, that's an edit of configuredomains.tpl, or if you have really complex requirements, you move the logic to a hook with maybe a minor template tweak... I quickly did something similar in the template for the thread below... ... where I added a link to a specific Email product... now I did that in the template, but you could equally add links to x number of products there - most of the code is just basic html, with perhaps a little sprinkling of Smarty magic to get the links to use that domain by default. so hopefully you can understand why I said it's simpler to not let them into the domain register page - because once they're in there, then you have to jump through multiple hoops to cripple what they can do in order to get them to order a product. 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.