How To Import User Custom Fields In Csv Import

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!

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.

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'
    )
)