Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

CPHP Create new countries from CSV (1 Comment)

$
0
0

Topic by Gregory Harrison

Content

Hi All, 

We need a list of all countries in the system, and as these can only be created one-by-one (no data-import wizard support) I'm attempting to create them by using the CPHP API.

I have a CSV of the countries values (Abbr, Name, and ISO) for each country.

When I hard code the values, such as $new_country->Abbreviation= 'AUS';, it works fine. But once I attempt to loop through the rows in the CSV, nothing happens.

Nothing appears in the log, either.

Has this sort of loop behaviour been limited? Why would this not work?

 

Also, any other suggestions to get 250+ countries into the database?

Thanks for any help you can provide.

Greg

Code Block


Viewing all articles
Browse latest Browse all 2504

Trending Articles