locked
add to wish list RRS feed

  • Question

  • User-1677526644 posted

     hi guys

     i have a situation where i need the user to add a product to a wish list. My first feeling was to handle this using cookies, but as i went along i found that there are some limitations in doing this. Could someone guide in the best way to achieve this please ?

     

    Thanks  

    Sunday, March 9, 2008 11:23 AM

Answers

  • User-699452191 posted
    The best way that i can think of doing this would be to have a database where you can save the wish list to. That way, when the user logs in, you can pull the items that they have added to the database and have them available.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 9, 2008 12:14 PM
  • User-568509865 posted

     hi

    take a look at this article,its satisfactory for me

    http://msdn.microsoft.com/en-us/library/ms379605.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 9, 2008 4:24 PM
  • User-774706235 posted

    let's say your site have Products

    when a user addes a product to his wish list, you make a cookie where you store the ProductID (primary key, int) from the database table where you store products

    Response.Cookies["wishList"].Value = productID;

    Response.Cookies["wishList"].Expires = DateTime.Now.AddHours(2);

    if the user already added before some products in his wish list (with other words, the cookie already exists - because you created when added first time), you make a new cookie with same name, but where you add the second product near first one

    String cookieValue = Request.Cookies["wishList"].Value.ToString();

    cookieValue = cookieValue + "," + productID;

    Response.Cookies["wishList"].Value = cookieValue.ToString();

    Response.Cookies["wishList"].Expires = DateTime.Now.AddHours(2);

    now you have in a cookie the productID's of with that user wants in his wish list[;)]

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 9, 2008 4:34 PM

All replies

  • User-699452191 posted
    The best way that i can think of doing this would be to have a database where you can save the wish list to. That way, when the user logs in, you can pull the items that they have added to the database and have them available.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 9, 2008 12:14 PM
  • User-1677526644 posted

    yes that`s a good option, but i need the user to be able to add products to wish list without any login processes 

    Sunday, March 9, 2008 1:54 PM
  • User-485211228 posted

    Hi

     Maybe you could try Profiles as these can be used by Anonomyous Users. See the themes and master pagers video on this website as it mentions how anonomyous users can apply themes to website. Addtional you can store anonomyous details in a database.

    Sunday, March 9, 2008 3:48 PM
  • User-568509865 posted

     hi

    take a look at this article,its satisfactory for me

    http://msdn.microsoft.com/en-us/library/ms379605.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 9, 2008 4:24 PM
  • User-774706235 posted

    let's say your site have Products

    when a user addes a product to his wish list, you make a cookie where you store the ProductID (primary key, int) from the database table where you store products

    Response.Cookies["wishList"].Value = productID;

    Response.Cookies["wishList"].Expires = DateTime.Now.AddHours(2);

    if the user already added before some products in his wish list (with other words, the cookie already exists - because you created when added first time), you make a new cookie with same name, but where you add the second product near first one

    String cookieValue = Request.Cookies["wishList"].Value.ToString();

    cookieValue = cookieValue + "," + productID;

    Response.Cookies["wishList"].Value = cookieValue.ToString();

    Response.Cookies["wishList"].Expires = DateTime.Now.AddHours(2);

    now you have in a cookie the productID's of with that user wants in his wish list[;)]

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 9, 2008 4:34 PM