Jump to content

Hide TLDs field from domain checker - SUPER IDEA!


onliner

Recommended Posts

Hello,

 

OK, not sure that that someone are using domain checker in this way with WHMCS. Basically, I don't want my clients to must select TLDs in domain checker. In that way domain checker will look like at "big" domain sellers.

 

I just want plain filed where they can enter domain Without selecting extension.

 

Has anyone come up with something?

 

Here is the original integration code which allow potential clients to go straight to the shopping cart with a domain entered:

 

<form action="https://www.mydomain.com/whmcs/cart.php?a=add&domain=register" method="post">
Domain: <input type="text" name="sld" size="20" /> <select name="tld">
<option>.com</option>
<option>.net</option>
<option>.org</option>
<option>.info</option>
</select>
<input type="submit" value="Go" />
</form>

 

I don't mind if I need to use 'hidden' fields etc.

 

Please check the attached image of what I want to achieve:

 

domain-check.PNG

 

Any idea?

Link to comment
Share on other sites

you're not using domainchecker with the above method, you're trying to add a domain direct to the cart using a form which I think requires both sld (google) and tld (.com) to be passed - even if you could pass it, it only prefills the cart search with the domain - the user would still need to press "Check Availability" in the cart to see if it was available.

 

perhaps a better solution would be to use the domain checker integration code:

 

<form action="https://www.mydomain.com/whmcs/domainchecker.php" method="post">
<input type="hidden" name="direct" value="true" />
Domain: <input type="text" name="domain" size="20" />
<input type="submit" value="Go" />
</form>

if you enter both a domain and tld, e.g whmcsonliner.com, it will pass it to WHMCS and search to see if its available; if you forget the .com, it will just pass whmcsonliner to WHMCS and then the user can select which tlds he wants to search.

 

if you have the bulk tlds settings correctly setup, and all the tld checkboxes ticked in domainchecker (either manually or with a template edit), then once the domain has been passed to the form, you could search for multiple options at the same time (whmcsonliner.com, .net, .org etc).

Link to comment
Share on other sites

you're not using domainchecker with the above method, you're trying to add a domain direct to the cart using a form which I think requires both sld (google) and tld (.com) to be passed - even if you could pass it, it only prefills the cart search with the domain - the user would still need to press "Check Availability" in the cart to see if it was available.

 

Actually no, the user is taken directly to the cart with all available TLD shown. I have managed to hide that TLD part. So far so good.

 

BUT!

 

The problem arises WHEN USER ENTER TLD part of domain in the domain checker.

 

For example:

 

domain.net

 

instead of

 

domain

 

THEN, landing in WHMCS show error "The domain you entered is not valid #"

 

So the question is: How to get WHMCS (domain checker) to ignore the ".TLD" part if user is entering it in domain checker?

 

We are still talking about the domain look up from 'Domain Ordering' integration code that can be found in every WHMCS.

 

Any idea?

Link to comment
Share on other sites

Actually no, the user is taken directly to the cart with all available TLD shown. I have managed to hide that TLD part. So far so good.

I think this is one of those glorious WHMCS situations where we're both right - depending on which orderform template you're using... I just tried it using Modern and the domain is searched for when you have the tld dropdown... I had it set to ajaxcart and the domain isn't searched for using that template.

 

So the question is: How to get WHMCS (domain checker) to ignore the ".TLD" part if user is entering it in domain checker?

you would be looking at using a javascript regular expression (regex) validation script to catch the error before it is passed to whmcs - it would need to check that the input contained alphanumeric only (i.e no full stops, @ etc).

 

you'll probably be able to find one via Google.

Link to comment
Share on other sites

I think this is one of those glorious WHMCS situations where we're both right - depending on which orderform template you're using... I just tried it using Modern and the domain is searched for when you have the tld dropdown... I had it set to ajaxcart and the domain isn't searched for using that template.

 

 

you would be looking at using a javascript regular expression (regex) validation script to catch the error before it is passed to whmcs - it would need to check that the input contained alphanumeric only (i.e no full stops, @ etc).

 

you'll probably be able to find one via Google.

 

Yes, thank you man! :)

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