HomeHome Product Discus... Product Discus...Enhancement Req...Enhancement Req...Smith Cart enhancementSmith Cart enhancement
Previous
 
Next
New Post
2/18/2011 12:00 PM
 

I would like to suggest a very minor enhancement to the smith cart.

As Dave is aware, I've been working on writing a DNN Module for RMA's.

In my routine, where they put in their information, I'm updating their DNN profile with the address, phone number, and so forth.

This was done in very few lines of code (below, VB... sorry... I know you write in C#... lol)

Anyway... it seemed like a no-brainer to get that information, updating their DNN profile as necessary, and even filling it in in the future from their DNN Profile.

I would like to suggest that when someone checks out, that their information (phone number, address, and so forth) is updated in the DNN profile as well, and in future populated from that information.

My reasoning:

1) People don't update their DNN Profiles. This would keep the information "Fresh" without any additional user process.

2) Filling forms from their profile is easy, and would eliminate the need for those additional fields to be stored in a separate table.

To get the profile information, I simply used the UserController.GetCurrentUserInfo method built into DNN:

Quote:

Dim userInfo = UserController.GetCurrentUserInfo()
With userInfo
txtUserName.Text = CType(IIf(String.IsNullOrEmpty(.Profile.FirstName & .Profile.LastName), "", .Profile.FirstName & " " & .Profile.LastName), String)
txtEmail.Text = userInfo.Email
txtPhone.Text = CType(IIf(String.IsNullOrEmpty(.Profile.Telephone), "", .Profile.Telephone), String)
txtAddress.Text = CType(IIf(String.IsNullOrEmpty(.Profile.Unit), "", .Profile.Unit & " "), String) & .Profile.Street
txtCity.Text = CType(IIf(String.IsNullOrEmpty(.Profile.City), "", .Profile.City), String)
txtState.Text = CType(IIf(String.IsNullOrEmpty(.Profile.Region), "", .Profile.Region), String)
txtZip.Text = CType(IIf(String.IsNullOrEmpty(.Profile.PostalCode), "", .Profile.PostalCode), String)

End With

... notice the use of the IIf's, so that eliminates trying to populate a text box with a null, which throws an exception.

To put the information back, I just set the values:

Quote:

'Update the DNN Profile with the form information
Dim userInfo = UserController.GetCurrentUserInfo()
userInfo.Profile.Telephone = txtPhone.Text.ToString
userInfo.Profile.Street = txtAddress.Text.ToString
userInfo.Profile.Region = txtState.Text.ToString
userInfo.Profile.PostalCode = txtZip.Text.ToString
userInfo.Profile.City = txtCity.Text.ToString

... in conclusion, I think that this would be easy to implement, and keep user profiles in DNN updated for contact information, without requiring the users to go to their profile and edit.

 
Previous
 
Next
HomeHome Product Discus... Product Discus...Enhancement Req...Enhancement Req...Smith Cart enhancementSmith Cart enhancement