WebSite X5Help Center

 
ISAT I.
ISAT I.
User

Zip code - how to filter data?  en

Автор: ISAT I.
Просмотрено 927, Подписчики 1, Размещенный 0  

Hello,

Our business depends from the serviced area, so we need to restrict the customers.

1. How can we create a search bar with postcode or the name of locations, where the customers can check the availability of our service?

2. How can we limit the orders just to this areas?

Thanks for the ideas,

Размещено
4 Ответы
John S.
John S.
User

1 - There are more possibilities for that. I think it will depend on how many zip-codes we are talking.

One way of showin the areas where service is available could be to show on a map.

You can see an example with the Google My map here : http://bramminginfo.dk/lokationer.html

Another example is with drawing areas : http://www.calendarforum.dk/cottages/cottage-list.html

You could also make a mail-form where you have the zip codes as drop-downs.

Or you could have the zip-codes in a CSV-file and then search for the zip-code.

Example of a searchable CSV - imagine that the first coloumn is a zip-code : http://eksempelsite.dk/sparta02/bullet-list---kopier4.html#Anchor03

2 - I have no good ideas of how to restrict orders - but if orders is given by a contact mail, then when using the drop-down where customer is forced to specify a zip-code via the drop-down then....

Читать больше
Размещено От John S.
ISAT I.
ISAT I.
User
Автор

Thanks for the ideas. 

On this page https://www.thebagster.com/ is the "Do we service your area?" part with the ZIP CODE searching bar. Is it possible to make it in the Website X5 somehow?

Читать больше
Размещено От ISAT I.
John S.
John S.
User

What you ask for can only be done by using special code. But it can be integrated in X5 by using the html-object.

Читать больше
Размещено От John S.
John S.
John S.
User

Example of code here :

https://www.tutsmake.com/ajax-php-mysql-search-example/

Demo of code here :

https://www.tutsmake.com/Demos/php/ajax-search.php

Here you have the content of the  Ajax-search-form in a html-object ( without the head and body tags )

Together with the connection script and the php script, it will show a field that filters data from a table that could contain zip-code records. The search is performed as you type.

In the demo - imagine that user is zip-code.

There are lots of scripts on the net. Pick the one you like best. Be sure it can handle sql-injection.

Читать больше
Размещено От John S.