Jump to content

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

How To Find Out The Variable Names Rate Topic   - - - - -

 
  • makneto
  • Member
  • Members
  • Join Date: 29-Apr 15
  • 24 posts

Posted 05 November 2015 - 07:35 PM #1

Hi,

 

We just created several new profile fields (Administration > Profile Fields) and we would like to add some of them to the invoice but we do not know the variables assigned. How can we find this out?

 

 

Thank you for the help!

Regards.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 06 November 2015 - 07:16 AM #2

They will be numerically indexed so you'll have to look them up in the DB to find the index related to that description.

Search the cscart_profile_field_descriptions table for the 'description' you are interested in.  The 'object_id' is the index value you will want to use in your templates or PHP code that references custom profile fields.

 

They should have done this by prompting for not only the "name", but also the 'index name' to use.  But....


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • makneto
  • Member
  • Members
  • Join Date: 29-Apr 15
  • 24 posts

Posted 06 November 2015 - 08:13 AM #3

They will be numerically indexed so you'll have to look them up in the DB to find the index related to that description.

Search the cscart_profile_field_descriptions table for the 'description' you are interested in.  The 'object_id' is the index value you will want to use in your templates or PHP code that references custom profile fields.

 

They should have done this by prompting for not only the "name", but also the 'index name' to use.  But....

 

Hi tbirnseth,
 
Thanks for the detailed info.
 
Do you know now how to add the 'object_id' field into the invoice? We managed to add the 'field_name' but not the 'object_id'.
 
 
Many Thanks,
Oscar


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 06 November 2015 - 06:41 PM #4

I don't remember exactly, but it's something like doing {$user_info.37} or {$order_info.37} (for index 37).  Note that you have to have them set to be visible on checkout or I don't think they will be available.  I'd give you a precise answer but I don't have the time to go research it right now.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


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

Posted 09 November 2015 - 08:16 AM #5

Please add the following code to the invoice template:

{$order_info|fn_print_r}

You will see full content of the array with order data. Review it and find where the custom profile fields values are stored


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 руб.