Zip Code Lookup Options
chazmonro
Posted: Wednesday, September 17, 2008 5:37:19 PM
Rank: Enthusiast

Joined: 10/5/2006
Posts: 23
I have a client that needs to do a zip code lookup. Here is how I am thinking about doing it.

First we create a member type called dealer, so we create all the dealers there. Then in a node on the content area of the site we create a doc type called zip code range. This allows the administrator to create zip ranges... for example, a low of 60000 and a high of 69999. They can then associate dealers with that zip range using a lef media picker.

I create a page that has a form on it that allows a user to submit a zip code, using the umbraco.library:Request(key) I grab the zip code they submitted on the previous page (probably same page with alternate template) and using xslt I find the zip code range the zip code falls under and list all dealers associated with that zip code range.

Now, how does that sound to you guys, a good plan or a bad plan? Remember, I am not a .net guy, so I don't really know how to write my own user controls or anything.

Chuck
kalpa
Posted: Thursday, September 18, 2008 12:16:28 AM

Rank: Fanatic

Joined: 7/19/2006
Posts: 496
Location: Göteborg, Sweden
I made a similar thing a few years ago that searched directly in the DB, that's not a good option.

Besides the ugly DB lookup my solution was similar to yours and have worked good for some years now.

I did that for a wholesale company to find retailers as well.

But...
...I kinda regret that it was map based instead, 'cause many of their retailers are tired of ending up in the bottom of the page or not getting enough attention in other ways.

Therefore the map option is better imo. If you are close to a retailer you'll probably select company by other criteria than only their name and have ..

// ;) Kalle

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
kern3l
Posted: Thursday, October 30, 2008 3:53:09 PM
Rank: Newbie

Joined: 10/30/2008
Posts: 1
Location: Göteborg
kalpa wrote:
I made a similar thing a few years ago that searched directly in the DB, that's not a good option.

Besides the ugly DB lookup my solution was similar to yours and have worked good for some years now.

I did that for a wholesale company to find retailers as well.

But...
...I kinda regret that it was map based instead, 'cause many of their retailers are tired of ending up in the bottom of the page or not getting enough attention in other ways.

Therefore the map option is better imo. If you are close to a retailer you'll probably select company by other criteria than only their name and have ..

// ;) Kalle




Im doing or right said, Im trying to do the exactly same thing you did a few years ago.
I have the customer list in an XML file that looks like this:
<ATERFORSALJARE>
<LANSKOD>18</LANSKOD>
<KONCERN>SH</KONCERN>
<NAMN>Materialmännen</NAMN>
<POSTADRESS1>Folkparksvägen 60</POSTADRESS1>
<POSTADRESS2>Rondellens Köpcenter</POSTADRESS2>
<POSTNR>59362</POSTNR>
<ORT>Västervik</ORT>
<LAND>Sverige</LAND>
<TEL>020-350 400</TEL>
<EPOST>info@materialmannen.se</EPOST>
<WEB>www.materialmannen.se</WEB>
</ATERFORSALJARE>

With an XSL file Im showing at the moment all the customer in a list sorted by name.
If a customer has a value in <KONCERN> the XSLT will show a picture depending on the value.
For example SH means Svenska Hem, so the picture will be Svenska Hems logotype.

But what I havent solved is to do different links to show different customers.
I want: LINK1 to show all customers that has <LANSKOD>01</LANSKOD>
I want: LINK2 to show all customers that has <LANSKOD>02</LANSKOD>
and so on...

I havent solved a so called supersearch. I want to add a search function that searches through the whole XML. So you can search all field at the same time.

Would be very greatful if someone could help me with this.

If someone has some time over, and maybe can help me through MSN:
george_makdesi@hotmail.com

/George
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.