Jump to content

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

How To Import User Custom Fields In Csv Import Rate Topic   - - - - -

 
  • Kate_Clar
  • Newbie
  • Members
  • Join Date: 10-Jun 20
  • 1 posts

Posted 10 June 2020 - 12:01 PM #1

Hi there,

 

I would like to do a large user import to CS Cart. We have a number of custom fieds that we would like to populate, but are having difficulty working out how we should prepare the custom field data. 

 

We have 3 custom fields we are trying to import:

- ABN (short text field)

- Trading Since (short text field)

- Type of Business (drop down box, stored as number 1-9 in database)

 

When I export users, this is an an example of how the data exports:

{""user"":{""ABN"":""123456789"",""Email"":""kate@emailaddress.com.au"",""Facebook Page"":"""",""Trading Since"":""2000"",""Type of Business"":""1"",""If other, please specify"":""""},""profile"":{""38"":{""B"":{""profile_id"":""1"",""description"":""Fax"",""value"":"""",""section"":""B"",""field_id"":""38""}},""39"":{""S"":{""profile_id"":""1"",""description"":""Fax"",""value"":"""",""section"":""S"",""field_id"":""39""}}}}"

 

I've been unable to find any documentation on how to import custom field data to users - can anyone help point me in the right direction?

 

Thanks! 



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

Posted 10 June 2020 - 07:07 PM #2

If you have added these fields to the cscart_users table then you can use a my_changes addon schemas/exim/users.post.php file to extend it to accommodate your new fields.

 

If you have them stored elsewhere, you will have to write new exim users_functions.post.php schema to fetch/store data for those fields.


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
  • 20757 posts

Posted 11 June 2020 - 05:56 AM #3

 

I've been unable to find any documentation on how to import custom field data to users - can anyone help point me in the right direction?

 

 

There is no such documentation. The "Extra fields" should contain json encoded array with the following structure

array(
    'user' => array(
        'ABN' => '123456789',
        'Trading Since' => '2000',
        'Type of Business' => '1'
    )
)

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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)