(Photo: Wolf portrait 3 by Tambako the Jaguar)
ProfileTools provides methods for updating a profile. In ATG Commerce you can access the ProfileTools via the CommerceProfileTools.
Therefore to update a profile it is as simple as calling the update methods in ProfileTools.
getCommerceProfileTools().updateProperty(propertyName, property, getProfile()); getCommerceProfileTools().updateProperty(propertyTable, getProfile());
The update methods get the MutableRepositoryItem for the profile, set the property in the MutableRepositoryItem and then update the item in the ProfileRepository.
Pretty simple, eh? 🙂