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.
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.
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.
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!
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
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
I imagine you could also store the data in a cookie so that the user doesn't necessarily have to be logged in.
Thanks for the info.
In this case the user are not logged in, so we will need to use a cookie for it.
//Kalle
is working on a reply...
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.