I hope someone can help me with this.
We have setup a web app to list the location of all their New Zealand stores.
The client would like the ability for customers to search by suburb rather than postcode within a 100km radius. Their reasoning behind this is because customers will remember a suburb rather than a postcode.
I have used the BC module tags, layouts and search forms and it is working perfectly for postcode. I just want to add another input box so that the customer can search by suburbs in their radius (maximum of 100km).
How would I go about doing this?
I thought it would be a simple case of copying the 'Postcode' input and updating in to 'City' or 'Suburb' as in example below, but I was mistaken:
Search by Suburb:<br />
<input type="text" name="City_16000" id="City_16000" class="cat_textbox" maxlength="255" style="width: 180px;" />
Search by Postcode:<br />
<input type="text" maxlength="255" name="Postcode_16000" id="Postcode_16000" class="cat_textbox" style="width: 150px;" />
<input type="hidden" id="Country_16000" name="Country_16000" value="NZ"/>
The use case for the proxmity search feature is that the customer enters their own postcode, and nearby results are returned. I don't see why a customer would have trouble remembering their own post code.
However I can see the case where a customer wants to search for a store in a particular area, but not necessarily their own area, and may not know the postcode for that.
You can search by exact city/suburb match by simply creating fields to hold this information for each item. Or just use the builtin address fields. However this will not enable proximity searching, just an exact match.
To do any kind of proximity matching, you will have to submit the postcode value, that's the only way BC has to do this. You could craft the UI to abstract this though. It would involve using some technique to map names to postcodes.
A simple implementation could be done with a drop down such as
<option value="90210">Suburb 1</option>
<option value="90215">Suburb 2</option>
<option value="90218">Suburb 3</option>
In that example the user would see the name of the suburb, but the value submitted to the form would be the postal code. There are obvious drawbacks to that approach.
Thank you for your feedback.
The lookup is for mobile service availablility, therefore when someone is out on the road, they have a better chance of remembering which suburb they are in rather than the postcode.
I can see your point that it would be difficult to match all suburbs with their postcodes in the drop down, especially since Australia and New Zealand have a lot of them as well.
Really do not see the need in all of that.
You see the link about find out your postcode. I am sure Postal services in OZ has these as well and just hook into those.
Just more simple, Postcode find works so well in BC and can make for simple clean layouts, just this bit helps people find their postcode if for someo reason they do not know it.
It often easy to over complicate things, Software developers often prone to this, lol. Always good to break down the problem and always look for the most simplicest sollution. That normally is always the best
What we have decided to do is have a web app, in a web app. We have a list of the suburbs and associated postcodes. We are going to have a search section for that (most possibly in an iframe) within the postcode proximity form, and then the customer can search for the suburb, and place the postcode the system spits out into the postcode field.