Forum Moderators: coopster & phranque

Message Too Old, No Replies

How to build a search engine like zappos

search engine web development

         

davidj003

8:57 pm on Jun 16, 2015 (gmt 0)

10+ Year Member



Hi,

I really like how zappos.com inventory search engine works and would like to develop something similar.

I'm having trouble understanding how they did it.

For instance search nike blue

Select a checkbox or an href on the left menu.

Also I noticed that the url changes yet it doesn't seem to refresh

Is this working with Ajax or is the page refreshing completely.

Also how are do they handle the back button. I noticed that when you

press the back button the checkbox select disappears which shouldn't happen since its the last state of the previous page.

Any ideas?

(Note i put it in this forum because I will be developing in Perl or php)

thanks

David

inbound

9:35 pm on Jun 16, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Look into the use of the hash in the URL that changes after a click. That's the key.

The hash is an internal link in the page (so no page load). It is probably a bit of Javascript that is intercepting the normal action of some links on the page (as the ones you talk about are set up as links that should load a new page). When a particular pattern of link is intercepted the code will then fetch the new data to show. This is also why the odd UI changes happen, the back button is "skipping" to an internal link (but the page does not move as the internal link does not exist - it's been used to pass variables. This looks to break with convention, so you might want to implement the code in a different way.

davidj003

2:50 pm on Jun 17, 2015 (gmt 0)

10+ Year Member



HI,

Look into the use of the hash in the URL that changes after a click. That's the key.

The hash is an internal link in the page (so no page load). It is probably a bit of Javascript that is intercepting the normal action of some links on the
page (as the ones you talk about are set up as links that should load a new page). When a particular pattern of link is intercepted the code will then fetch
the new data to show.

How would you use the Hash to intercept calls to the javascript then
it fetches the data with no page refresh. It uses an ajax call and puts the data into a <div>?


This is also why the odd UI changes happen, the back button is "skipping" to an internal link (but the page does not move as the
internal link does not exist - it's been used to pass variables. This looks to break with convention, so you might want to implement
the code in a different way.

How would it pass the data to internal link when someone presses the back button?

Why is it a break with convention.


Thanks
David j

incrediBILL

4:02 pm on Jun 17, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As a prior developer of a complete ecommerce package DON'T DO IT FROM SCRATCH!

I know exactly how they did it as a matter of fact as I built a major competitors site to Zappos once. They also had a clothing line, after only two years they got the hell out of shoes. I got paid either way, but the site was amazing.

For starters, your database has to have inventory and attributes, meaning for each inventory item there has to be the brand, size, color, and quantity among other things. If it has all that, they you can sort by all those things. If the database is done wrong, your code will be a total misery.

FYI, ask people for their size and remember it, even the big sites get that wrong and lose it every time you change pages which irritates me all to hell as my size didn't change, but they don't remember it so every damn page I'm clicking 2X or size 10.5D for shoes, etc. Damned annoying.

What you need can be obtained off the shelf, already debugged as you'll find tons of things you're going to need and it will take much longer than you think and by the time you're done, the business model could be obsolete. :)

Find something off the shelf, tweak it if needed, but others have already done this just like I did, you just need to research it and you might even find it for free in open source.

inbound

4:12 pm on Jun 17, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree that starting from scratch is not the way to go. I was answering the UI question, given the further questions you ask to that I think that you really need to assess your capability to build it from the ground up. You could spend far less time researching options available to you commercially or via OSS. A nice, unique, ordering system will not be the feature that wins you much custom - concentrate on what will and settle for an off-the-shelf package.

davidj003

9:41 pm on Jun 17, 2015 (gmt 0)

10+ Year Member



HI,

I have to admit I have started already from scratch but I'm still scratching my head on some of the difficulties.

For instance
a. the back button,
b. ajax versus cgi. I'm using cgi so that entire page is redisplayed but now considering ajax. The difficulty is to get different sets of options indexed by the search engines and then have it map directly to the specific page if its ajax.
c. another difficult aspect is to know what checkboxes to leave open on unseleted categories based on previous selections whether checkbox or href. This is very complicated and I'm still struggling.

Thanks!

David