Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Displaying A Custom Profile Field Rate Topic   * * * * * 1 votes

 
  • ffvince
  • Newbie
  • Members
  • Join Date: 11-Mar 12
  • 9 posts

Posted 05 February 2015 - 05:15 PM #1

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?

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2686 posts

Posted 06 February 2015 - 08:59 AM #2

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}
{/if}
in your template.

Best regards, Alt-team.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • ffvince
  • Newbie
  • Members
  • Join Date: 11-Mar 12
  • 9 posts

Posted 06 February 2015 - 10:02 AM #3

Perfect! Thank you!

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2686 posts

Posted 06 February 2015 - 10:08 AM #4

Perfect! Thank you!

You are welcome.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • aircomms
  • Junior Member
  • Members
  • Join Date: 30-Jun 08
  • 110 posts

Posted 18 March 2015 - 04:04 PM #5

Hi,

How would adapt this for v4.2.4

Thanks

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19593 posts

Posted 19 March 2015 - 09:15 AM #6

How would adapt this for v4.2.4


This code should work in 4.2.4. Please try

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • aircomms
  • Junior Member
  • Members
  • Join Date: 30-Jun 08
  • 110 posts

Posted 19 March 2015 - 10:19 AM #7

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}
{/if}

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}

 
  • aircomms
  • Junior Member
  • Members
  • Join Date: 30-Jun 08
  • 110 posts

Posted 19 March 2015 - 11:45 AM #8

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}<br />
{/if}{/if}