Jump to content

hosting required before checkout?


Anders

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

2020-03-17_13-34-50.jpg

Link to comment
Share on other sites

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...

pBzQs3G.gif

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.

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