andyhughes73 Posted October 30, 2017 Share Posted October 30, 2017 Hi All, I'm having a bit of trouble working out how to do something relating to domain search and I'm hoping you can help. I am setting up a website that will offer hosting, emails, domains etc for my web design business. I have the site built and am just trying to configure the domain registration element. I have set the pricing, set the domain registrar as enom, but I'm not sure how to link to the "domains" page on my website. WHMCS is installed into a sub-directory called "customer". I tried setting the domain purchase up as a product but that didn't work as when I used the product link on a button in my site, it added both the product and then the enom domain product too. In short, I want to do two things: link the buttons from the table showing domain extensions to WHMCS so the customer can then do a search. link to the search bar on my domains page so that people can search for a domain and extension directly in the page before being transferred to the WHMCS page. Am I thinking along the right or wrong lines? Is it possible as I can't find urls anywhere to link domain searching or to link directly to the WHMCS domain choice page. Any help you can give would be gratefully received thanks. Andy Link to comment Share on other sites More sharing options...
RadWebHosting Posted October 31, 2017 Share Posted October 31, 2017 Andy, in your WHMCS admin area, you should find "Integration Code"within the Utilities. You will have something similar to <form action="https://whmcsdomain.com/customer/cart.php?a=add&domain=register" method="post"> Find your Domain: <input type="text" name="query" size="20" /> <input type="submit" value="Go" /> </form> This is the official, out-of-the-box approach to linking to/searching domains from a directory other than /customer. Hope this is helpful. Link to comment Share on other sites More sharing options...
andyhughes73 Posted November 1, 2017 Author Share Posted November 1, 2017 15 hours ago, radwebhosting said: Andy, in your WHMCS admin area, you should find "Integration Code"within the Utilities. You will have something similar to <form action="https://whmcsdomain.com/customer/cart.php?a=add&domain=register" method="post"> Find your Domain: <input type="text" name="query" size="20" /> <input type="submit" value="Go" /> </form> This is the official, out-of-the-box approach to linking to/searching domains from a directory other than /customer. Hope this is helpful. Thank you for the reply. Yes it was helpful, I managed to find the code snippet and have added it and styled it and all works well. Do you know if there is a way for someone to preselect the domain extension before through my website that will pre-populate WHMCS. For example, if someone wants blahblahblah.com, can I set a button for .com domains on my website that the customer clicks on and when it takes them through to WHMCS, it has already searched for the .com? I have looked all over the documentation but can't find anything that relates to it. Thanks Link to comment Share on other sites More sharing options...
brian! Posted November 1, 2017 Share Posted November 1, 2017 Hi Andy, 17 hours ago, radwebhosting said: This is the official, out-of-the-box approach to linking to/searching domains from a directory other than /customer. that's true - but there are alternatives depending on exactly what you need to do... e.g using a Data Feed to generate the form and pre-fill the dropdown list with the TLDs entered into your domain pricing page. <script language="javascript" src="feeds/domainchecker.php"></script> that would pass a query to the domain search page and initiate the search (assuming you didn't have captcha enabled). On 10/30/2017 at 7:07 PM, andyhughes73 said: link the buttons from the table showing domain extensions to WHMCS so the customer can then do a search. you're using the foxuhost template? if I were you, i'd probably drop that entire table... or if you're going to keep it and have hundreds of TLDs listed within it, pull the pricing from the database using a feed - that way, you don't have to worry about keeping it updated.... and these "Register" button links could just be redirected to "cart.php?a=add&domain=register". if you had a specific domain you wanted to search for (e.g google.com), then you could pass that in a direct link and the cart would search for it, but not a TLD by itself. On 10/30/2017 at 7:07 PM, andyhughes73 said: link to the search bar on my domains page so that people can search for a domain and extension directly in the page before being transferred to the WHMCS page. for that, then it's the manual form from the Integration Code or the feed replacing the existing form - either will do the job... though you may have to play with the CSS. 1 Link to comment Share on other sites More sharing options...
andyhughes73 Posted January 17, 2018 Author Share Posted January 17, 2018 On 11/1/2017 at 3:52 PM, brian! said: Hi Andy, that's true - but there are alternatives depending on exactly what you need to do... e.g using a Data Feed to generate the form and pre-fill the dropdown list with the TLDs entered into your domain pricing page. <script language="javascript" src="feeds/domainchecker.php"></script> that would pass a query to the domain search page and initiate the search (assuming you didn't have captcha enabled). you're using the foxuhost template? if I were you, i'd probably drop that entire table... or if you're going to keep it and have hundreds of TLDs listed within it, pull the pricing from the database using a feed - that way, you don't have to worry about keeping it updated.... and these "Register" button links could just be redirected to "cart.php?a=add&domain=register". if you had a specific domain you wanted to search for (e.g google.com), then you could pass that in a direct link and the cart would search for it, but not a TLD by itself. for that, then it's the manual form from the Integration Code or the feed replacing the existing form - either will do the job... though you may have to play with the CSS. Thanks for your input Brian. I think my option will be to just use each button to take the user to the main search anyways. The table is there more to fill out the page with content. I've had support from WHMCS who have helped me populate the domain search result with "yourdomainhere.co.uk" and I can set the relevant tld part. About as good as I'll get for now, given my time constraints. Thanks again Andy Link to comment Share on other sites More sharing options...
Recommended Posts