More in this section

Forums / Developing with Sitefinity / profile for shopping cart

profile for shopping cart

2 posts, 0 answered
  1. Priya Ramesh
    Priya Ramesh avatar
    26 posts
    23 Jul 2009
    08 Feb 2010
    Link to this post
    Hi ,
      I am using profile to store user's shopping cart( it is an object with a list of items). I am able to store and retrieve object in profile if I use aspnet profile provider. But the code doesn't work if I use sitefinity as profile provider. Can I only use asp net profile provider when storing a object?

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    08 Feb 2010
    Link to this post
    Hi Priya Ramesh,

    Thank you for using our services.

    Sitefinity does use the standard ASP.NET profile provider wrapped in our functionality. Could you please show us how are you working with the profile provider. Bellow is a sample snippet which illustrates we would usually access user profiles from the default provider.
    //get the profile from the default profile provider of current logged in user
    System.Web.Profile.ProfileBase userProfile = System.Web.Profile.ProfileBase.Create(Telerik.Security.UserManager.Default.GetUser().UserName);
    //get first name
    string firstName = userProfile.GetPropertyValue("FirstName") as string;
    //modify first name and save changes
    userProfile.SetPropertyValue("FirstName", "New Value");

    All the best,
    Radoslav Georgiev
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
2 posts, 0 answered