Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kalle Ekstrand 181 posts 259 karma points c-trib
    Aug 02, 2010 @ 21:10
    Kalle Ekstrand
    0

    Creating a function for adding items to favourites?

    Hi there,

    We are currently developing av new website for a customer with a custom products section.

    does anyone have any ide how to create a function for adding items from the products section to a "favourite" section? Kind of like adding to i shopping basket, but instead favourites.

    Thanks!

  • Josh Townson 67 posts 162 karma points
    Aug 02, 2010 @ 23:51
    Josh Townson
    0

    Hi Kalle,

    I did something similar on a website not long ago. Basically I set up a db table for storing the favourites, and wrote a line recording the username and the nodeid of the favourited product. We interface with it using an xslt function to get all favourite items, and a .NET usercontrol to add solutions to the list,

    Obviously this solution only works if your users are logged in. Otherwise, you can write a cookie or session variable with the nodeids of favourited solutions, and handle it all like that - you should be able to do that in pure xslt.

    /Josh

  • Matt Brailsford 2958 posts 15629 karma points MVP 7x c-trib
    Aug 03, 2010 @ 12:45
    Matt Brailsford
    0

    I don't think anything exists out of the box, but I would have a look at the source to SocialFront (http://our.umbraco.org/projects/collaboration/socialfront-for-umbraco) as they have a good example of using the Relation API to favourite things in a "social" manor. Should be a good starting point for you.

    Matt

  • Seth Niemuth 275 posts 397 karma points
    Aug 03, 2010 @ 13:12
    Seth Niemuth
    0

    I imagine you could also store the data in a cookie so that the user doesn't necessarily have to be logged in.

  • Kalle Ekstrand 181 posts 259 karma points c-trib
    Aug 04, 2010 @ 10:43
    Kalle Ekstrand
    0

    Thanks for the info.

    In this case the user are not logged in, so we will need to use a cookie for it.

    //Kalle

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies