Avatar of Panos
Panos
Flag for Germany asked on

Build a watch-item page (like shopping cart) in coldfusion.

Hello experts.
I have a search page and a result page.From here now i want to built a page where a user can <watch> the items he wants like the shopping cart.
The user doesn't have to be logged in.
On the new page i need  a button to delete the items that someone don't want to watch any more.
How is this working?Do i need a new table?
(I use coldfusion and MS SQL)

 
Web ServersColdFusion LanguageWeb Development Software

Avatar of undefined
Last Comment
Panos

8/22/2022 - Mon
SRIKANTH MADISHETTI

one thing u said u want to delete the item ,what exactly you mean by delete you want to delete the item permanently or  you dont want to show to only that particulat user,.  ( you said no need to log in to view this page )

if it is  like deleting permanently then u can delete from the master table or change the flag to inactive if ur using falgs.
Panos

ASKER
Hello srikanthmadishetti:
I mean like the shopping card.If you don't realy want to buy something you delete it in your basket and than you see the rest of your basket.
In this case i want to watch cars.If i'm not anymore interested in one car i can delete it (from my watching itemspage ,Not from the DB)
Zvonko

You need a new table. The table primary keys are the user key and the item key (the wached item). Additional columns could be whatchlist item creation date, report creation frequency for that item, and so on.

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
SRIKANTH MADISHETTI

hi panosms

you want  no user log in right i mean user can shop with out logging in and at check out u will ask for the user  details.
Panos

ASKER
Hello again.
If you go to sites like search cars,you don't have to be logged on to watch items.Looking at mobile.de you will se in the english version that there is a link to :My Park.
Here you send the items from the result page.i think that is working with cookies or session.
Zvonko

I do not think that all whatchlist data is stored in Cookies, so if not logged in then you are "logged" by a cookie that is generated for you by that web site. As soon as you come again with that cookie you are recognised as former "user" of that page and your old cookie with the generated userid is reused. But all the other information about your visit and your wish list or watch list is stored on server side in some sort of persitant storage, and that is mostly a database.
So your userid in my upper table is the "userid" from the cookie vistor id.

⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Panos

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.