Create or Edit Profile Properties
Version: 8.2
Update profile properties in Sitecore Commerce 8.2 powered by Commerce Server and Commerce Server 11.4 or Sitecore profile store.
Complete the following prerequisites:
-
Integrate Profile Properties with the Sitecore Profile Store
-
You have setup a page in Sitecore with associated codebehind or MVC Controller.
At your Visual Studio Solution setup:
-
Get a property.
RequestResponseSitecore.Security.UserProfile profile = user.Profile; var userId = profile.GetPropertyValue("phone_number") as string;
-
Set an existing property, or create a new one.
RequestResponseSitecore.Security.UserProfile profile = user.Profile; profile.SetPropertyValue("phone_number", "(123) 123 1234");