View Single Post
  #3  
Old 04-30-2009, 12:40 AM
 
2inchesofwater 2inchesofwater is offline
 

Member
  
Join Date: May 2007
Posts: 24
 

Default Re: Adding custom User Profile field

Okay, so this is me jotting down some thoughts to get my own head around this issue.

I've discovered that if I activate the "Loyalty Discount" custom field for Customer usertypes (not just Admins), then the field appears on Customer user profile pages. That's a good start, but doesn't solve the problem.

The Loyalty Discount is a setting that only Admins should be able to set, on a Customer by Customer basis. Customers (and Providers too) should never be able to see this particular custom field.

I've tracked the presentation code all the way to skin1\main\ register_additional_info.tpl
Of course, the whole point of Smarty is to divorce the presentation layer from the business logic layer. So I need to head back up the tree, and find some PHP code where I can shut off this one particular instance of custom/registered fields.

When I get there, I need to check the custom fields carefully, because I don't want to shut down any future custom fields.
I'll be looking to check that the $fieldid does not equal this particular custom field - every other custom field should slip straight through the filter. I know that isolating and hard-coding one custom field isn't a great idea, but running out of ideas and budget on this project. I also need to check that it's only Admins who can see this custom field.
__________________
xcartpro4.2
Reply With Quote