Importing Data with Custom Fields

I’m trying to import around 500 clients via csv and i can do that fine no problem with the pre-existing fields in the clients sections but hitting an issue with custom fields.

I have added a Custom Field called ‘Contact Name’ in the clients part and it has given the column name as ‘client_custom_contact_name’ so that’s what i’ve put in my csv as another column and most of the records have something in this.

When i import the data, it fails returning this information:

A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: models/mdl_import.php

Line Number: 414

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /customers/2/8/4/

Filename: helpers/url_helper.php

Line Number: 542

If i leave out this column from the csv, all the clients import fine with no problems.

Apologies if i’m doing something wrong which is really obvious, but can anyone help at all?



Not possible at the moment, see for more details.

Yes this would be a great function. Unfortunately there are some input fields missing in the customer section which have to be added as custom fields.

In general it would not be a bad idea to add at least the following fields by default:

  • bank account details (BIC/IBAN in Germany)
  • tax number of client
  • company name / name of contact person in company
  • customer id

I agree with xnetworks, about some more custom fields but at least the standard

Taxes Code:

are the minimum goal to make it functional

I’m autoquoting myself.

vat_id & tax_code are simply importing modifing \application\modules\import\models\mdl_import.php

adding after ‘client_web’,


So the code block becomes:

    'clients.csv' => array(

I hope that should be helpful.

Obviously the clients.csv columns must be modified reflecting this change.