Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recently viewed items code

Status
Not open for further replies.

luciai

Programmer
Jul 25, 2002
13
CA
Can anyone provide a sample of "Recently viewed items" that is shown on Ebay and Amazon. I have tried coding this with cookies but can only retrieve one value. I don't know how the cookie code looks with multiple values stored. I would like like to show the last 3 viewed items everytime the user goes back to view the merchandise list page. Thanks in advance for your assistance!
 
recently viewed items are usually accompanied with logins. or username/password identities. Then you track the users movement through the items.

during this process you would have a back-end data source (for this a DB) and perform strategic inserts on what items the user views.

Then giving the user a option to view recent items in the form of a link/button etc.. you simply query the database either by the last week/day/session or whatever you think recent is to your visitors. That usually greatly depends on the content or items themselves. if it is a car, you want to keep it recent for months, but if it's a flavor of jelly beans, a session may be fine.

that is how I've done it and would recommend it. It's a easy process to set up and easy to maintain.


___________________________________________________________________
[sub]
The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
[/sub]
 
I would like very much to have this accomplished through cookies. I think tracking the info in a database would result in slow performance of the website if there are a lot of users on at one time....and unnecessary data in the database. Ebay codes the "Recently viewed items" using cookies -- users do not have to login. If you turn off cookies, "recently viewed items" are not shown. I don't know how the cookie code looks with multiple values stored dynamically using ASP code. Can anyone point me in the right direction? Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top