CSV: Explained

CSV is an abbreviation that stands for Comma Separated Values. More Info. CSV files can be created from Databases like MySql or even programs like Microsoft Excel. This feature in our plugin lets you 'import' Listings from a CSV file (extension .csv). The format is one Listing per Line.

Where do I put my CSV file to import it?

CSV files must be placed in this folder:

../file/abstractbusiness/csv/

In that folder you'll also find a couple of example .csv files. You can open .csv files in any text editor to have a look at them.

How to import a CSV file

Ok, now that you have placed your .csv in the right folder, visit the CSV area of this plugin's admin panel. At the top of that page is a drop-down selector with all of the un-configured .csv files in that folder. Select the one you want to configure and click 'Configure New Csv File'.

Now, you'll see a new area entitled 'Step 2' with a few things to enter. I will explain what these things are here:

Start Line: This indicates on what line number the first record is. If you open your .csv file and there are no comments or blank lines before the data begins, enter 0 (the very first line in the file is line # 0).

Field Separator: This is the character that separates each value. Usually, this would be the comma (,) but sometimes this can be different.

Field Enclosure: This is the character that encloses each value. Usually, this would be the double-quote (") but sometimes this can be different.

Field Escape: This is the character that escapes the Field Enclosure character if the Field Enclosure character is found inside of the enclosure. Usually, this is the forward-slash (\) but sometimes this can be different.

MVC Field Separator:: This is the character that separates MVC (multi-value column) values. This will not be used in most cases.

Duplicate Mode: This tells the plugin how to treat duplicates when importing this .csv file.

For clarification, let's try an example .csv line:

"Bill's \"Real\" BBQ","Restaraunts","Southern","1234 Barbeque Road","Austin","TX","64536","US","Good Eats!"

In this example line, we'd determine as follows:

Field Separator: ,

Field Enclosure: "

Field Escape: \

MVC Field Separator:: leave blank

When you have Step 2 configured properly, click 'Submit' to move on to Step 3.

Ok, now for Step 3: Define Columns. If you've setup Step 2 correctly, you'll now be presented with a data sample (from the start line) for each column. All you have to do here is indicate what each column is in the drop-down selector. Not every column needs to be defined, only define the ones you want to use. You can leave the MVC Schema field blank.

In the drop-down you will notice there is an option to define a column as 'Image Url'. This can be used to import an image for each listing. To use this, the urls must be the full url to each image file.

Also, something cool to note, is that you can use the CSV feature solely to import Categories and Subcategories if you desire. Columns defined as Category or Subcategory will be automatically cross-checked to see if this Cat/Sub already exist, and if not, they will be created.

Once you've defined the columns you want to use, click 'Submit' for Step 3. Configuration of the CSV is complete!

Now, the .csv file you've just configured will be included in the list under 'Configured Csv Files', and from that list you'll click 'Import' to engage the importation. Depending on how large your .csv file is, the import procedure can take extremely long. For example, if your .csv file contains 40,000 listings, this procedure can take many hours.

The importer will import listings in batches of 10, after each 10 listings it will refresh the http connection, and resume the procedure with the next 10 listings. It will continue this on auto-pilot until all the listings are imported. If for some reason, the connection is disconnected and the procedure is stopped, the importer will remember where it left off. Simply revisit the CSV area, and click the 'Import' button for the file that was interrupted. When the procedure is complete, the 'Import' button will no longer be visible next to that file, and will be replaced by a 'Remove' button. Clicking 'Remove' will reverse the import.