How best to implement "favourites" feature? (like favourite products on a data driven website)
- by ClarkeyBoy
Hi,
I have written a dynamic database driven, object oriented website with an administration frontend etc etc. I would like to add a feature where customers can save items as "favourites", without having to create an account and login, to come back to them later, but I dont know how exactly to go about doing this... I see three options:
Log favourites based on IP address and then change these to be logged against an account if the customer then creates an account;
Force customers to create an account to be able to use this functionality;
Log favourites based on IP address but give users the option to save their favourites under a name they specify.
The problem with option 1 is that I dont know much about IP addresses - my Dad thinks they are unique, but I know people have had problems with systems like this.
The problem with 1 and 2 is that accounts have not been opened up to customers yet - only administrators can log in at the moment. It should be easy to alter this (no more than a morning or afternoons work) but I would also have to implement usergroups too.
The problem with option 3 is that if user A saves a favourites list called "My Favourites", and then user B tries to save a list under this name and it is refused, user B will then be able to access the list saved by user A because they now know it already exists. A solution to this is to password protect lists, but to go to all this effort I may as well implement option 2.
Of course I could always use option 4; use an alternative if anyone can suggest a better solution than any of the above options.
So has anyone ever done something like this before? If so how did you go about it? What do you recommend (or not recommend)?
Many thanks in advance,
Regards,
Richard