Display all customer profile fields in Admin Profiles Update page

Ive got a frustrating problem with the way v2.1.4 CSCART handles the display of User Profile Fields in the ADMIN > profiles.update page.

Ive got the profile_fields settings so that the Store’s Registration page just require the customer to enter email address and password.

Now if a customer registers and places an Order, their Shipping/billing address etc is stored in the user profile… Thats cool… but the problem is:

When I am updating/viewing the a customers profile, the only fields that show on the Admin profiles.update page are those that are set in the profile_fields.manage page !!!

Sure I can go in and check the boxes for Profile Show / Required but that would show on the store front while I was editing the profile!

So the only way to fix this is to make modifications to the code to show all the fields.

I think the file that needs changing is “/skins/basic/admin/views/profiles/update.tpl” but Im not 100% sure.

Basically, a profile field needs to show if it is checked PROFILE or CHECKOUT, not just PROFILE, as it is now. Even a simple mod so that all the fields show in admin would be better than it is now.



Im hoping that someone may be able to help out with a code change to fix this.

Help appreciated.

Ok, Ive partially worked this out… and heres the code so far,

I cant yet work out how to get the “fn_get_profile_fields” function in /core/fn.user.php to discriminate between a call from the ADMIN side (skins/basic/admin/views/profiles/components/profiles_info.tpl) and a call from the CUSTOMER side (skins/[my_skin]/customer/views/profiles/components/profiles_info.tpl).

Changed this code in fn.user.phpin /core/fn.user.php if ($location == 'A' || $location == 'C') {
$select = ", ?:profile_fields.profile_required as required";
$condition .= " AND ?:profile_fields.profile_show = 'Y'";


To this: if ($location == 'A' || $location == 'C') {
$select = ", ?:profile_fields.profile_required as required";
$condition .= " AND ?:profile_fields.profile_show = 'Y' OR ?:profile_fields.checkout_show = 'Y'";


The “$location == 'A'” and “$location == 'A'” determining User type.



Now all the fields show in ADMIN, but they also now show on the Customer registration page.

Of course the Customer should only see fields as per the “PROFILES Show / Required” settings whereas the Admin needs to see all fields.

So I need a way for fn.user.php to discriminate between a call from the ADMIN side and a call from the CUSTOMER side.



Help appreciated.

So I need to know what variable I would use in fn.user.php to test for a “fn_get_profile_fields” call from admin or customer side.

As a temporary work around , with the above changes applied, I can temporarily set a users type to “Administrator”, which will enable the display of all the profile fields, make/save the changes then set back to “Customer”. This is however a very bad security risk.

Is there a way to test within the fn_get_profile_fieldsfunction of fn.user.php whether the call is from admin side or the customer side?

Help appreciated.