onliner Posted December 3, 2013 Share Posted December 3, 2013 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: Any idea? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 3, 2013 Share Posted December 3, 2013 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). 0 Quote Link to comment Share on other sites More sharing options...
onliner Posted December 3, 2013 Author Share Posted December 3, 2013 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? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 3, 2013 Share Posted December 3, 2013 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. 0 Quote Link to comment Share on other sites More sharing options...
onliner Posted December 3, 2013 Author Share Posted December 3, 2013 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! 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.