Displaying A Custom Profile Field

I have version 2.2.4 of CS-Cart and have a custom profile field which is called Registration number.

I know the is field ID 39 but I'm struggling to find a way of getting this field to display on my template as I want to display it in my header?

Dear Ffvince.

Use this code
{if $auth.user_id}
{assign var="user_data" value=$auth.user_id|fn_get_user_info}
{$lang.registration_number}: {$user_data.fields.39}
in your template.

Best regards, Alt-team.

Perfect! Thank you!

[quote name='ffvince' timestamp='1423216940' post='204495']

Perfect! Thank you!


You are welcome.


How would adapt this for v4.2.4


[quote name='aircomms' timestamp='1426694659' post='208287']

How would adapt this for v4.2.4


This code should work in 4.2.4. Please try

I was looking to use the above code in an invoice template to display the" company name" value I added in billing/shipping of profiles fields. I am taking the id value from that in the profile fields management page ie 42 & 43. and applied it to the code you suggested, clearing caches each time. but it will not give a company name value back to the invoice template as the code at the bottom does.

{if $auth.user_id}

{assign var=“user_data” value=$auth.user_id|fn_get_user_info}

{$lang.registration_number}: {$user_data.fields.42}


At the moment i use the following block call for all extra profile fields which is not helpful as it restricts what i use the extra fileds for -

{include file=“profiles/profiles_extra_fields.tpl” fields=$profile_fields.B}

Thanks - found the answer -

in the invoice template I used -

{if $order_info.fields.43 && $order_info.fields.43}

{if $order_info.fields.43}{$order_info.fields.43}