Jump to content
  • 0

Domain Search Help?


multibyte

Question

Hello everyone. 

 

Basically I have a script which on my old billing system worked by copying to url for the billing system when running a domain search. 

 

This meant for example the customer would search for the requested domain from my homepage using a search box this would then show what was available from the requested search on the billing system. 

 

The way it worked for example was say you wanted "yellow.com" the search would write a command showing "mywebsite.com/domain/search/yellow.com which would then show the availability on my billing system.

 

The problem I have with Blesta is that it doesn't show a searching url it masks it and keeps the same url. 

 

I have made a photo below hopefully explains what I mean.

 

Thanks

post-10521-0-16407900-1434819959_thumb.j

post-10521-0-56593700-1434819971_thumb.j

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

As I understand He want to put url in  his form action  ,so user is redirected when click on search to blesta domain search form.His problem is because there is no query in Blesta Url (method POST is used) and if He put existing url as action, user WILL be redirected but only to empty search form.

Link to comment
Share on other sites

  • 0

As I understand He want to put url in  his form action  ,so user is redirected when click on search to blesta domain search form.His problem is because there is no query in Blesta Url (method POST is used) and if He put existing url as action, user WILL be redirected but only to empty search form.

 

Thats exactly what I mean Nelsa and I didnt have much luck with the API :(

Link to comment
Share on other sites

  • 0

Thats exactly what I mean Nelsa and I didnt have much luck with the API :(

Well I can write form for you that will work in few minutes but problem is csrf token will change after few hours and it will not work,in practice you will have to disable csfr token or change it every day.

Maybe blesta staff have other solution,I don't see better way than disable csfr or change manualy csfr  in your form every day.

Here is example with csfr,if you disable it than just delete second <input> .Now if you want test it first or don't want to disable CSFR ,you can see csfr token using broswer inspector in devloper tools.Offcourse right way to do this woud be to implement searching and selecting domain on your site than sending user on package order form,this is just cheating :)

This form is tested and working,if you want add more tld extensions just copy/paste <option> tags and replace value and id.

 

<form action="https://your_order_form_url" method="post">

<input name="_csrf_token" value="your_csfr_token" type="hidden">

<input name="domain" value="" placeholder="yourdomain.com" type="text"> <select name="tlds[]">

<option name="tlds[]" value=".com" id="t.com">.com</option>

<option name="tlds[]" value=".org" id="t.org">.org</option>

<option name="tlds[]" value=".net" id="t.net">.net</option>

<option name="tlds[]" value=".in" id="t.in">.in</option>

<option name="tlds[]" value=".co" id="t.co">.co</option>

<option name="tlds[]" value=".biz" id="t.biz">.biz</option>

</select>

<input name="lookup" type="submit" value="Go">

Link to comment
Share on other sites

  • 0

Well I can write form for you that will work in few minutes but problem is csrf token will change after few hours and it will not work,in practice you will have to disable csfr token or change it every day.

Maybe blesta staff have other solution,I don't see better way than disable csfr or change manualy csfr  in your form every day, here is example with csfr,if you disable it than just delete second <input> .Now if you want test it first or don't want to disable CSFR ,you can see csfr token using broswer inspector in devloper tools.

 

 

<form action="https://yourorder.form.url" method="post">

<input name="_csrf_token" value="your-csfr-token" type="hidden">

Domain: <input type="text" value="" placeholder="yourdomain" size="20"> <select name="tlds[]">

<option name="tlds[]" value=".com" id="t.com">.com</option>

<option name="tlds[]" value=".org" id="t.org">.org</option>

<option name="tlds[]" value=".net" id="t.net">.net</option>

<option name="tlds[]" value=".in" id="t.in">.in</option>

<option name="tlds[]" value=".co" id="t.co">.co</option>

<option name="tlds[]" value=".biz" id="t.biz">.biz</option>

<option name="tlds[]" value=".info" id="t.info">.info</option>

</select>

<input name="lookup" type="submit" value="Search">

 

 

Thankyou Nelsa I will try and have a go at this. 

Link to comment
Share on other sites

  • 0

Just to know first time I paste form here I forget to put name="domain" in third input(placeholder) and since this woud became variable value once you submit form it will not work without it,in fact it will redirect you on blesta domain search form without query(this is just in case you copy form before I corect it).

Form is corected and now it is complete.

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
Answer this question...

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

Loading...
×
×
  • Create New...