Importing Products

I’ve had several requests from developers asking for an import tool. After doing some fishing around, I found the CSV Importer plugin which works very nicely with FoxyShop. If you would like to import your products in one step, this is a great tool.

Download this sample file for excel which I’ve created as a guide for importing your files. Put your data into this sheet and then export as a CSV.

Here are some notes and tips:

  • The biggest limitation is that the importer does not import images. You’ll have to do those yourself. I have patched the plugin to accept a url in the csv_image column (add this column). If you want to use this functionality, you’ll need to download this special version of the plugin since the original developer hasn’t integrated it yet.
  • If you are using a Mac, make sure that you save your CSV with Windows Line Breaks.
  • When importing, don’t select a category from the plugin’s GUI.
  • When loading in your data, you don’t have to leave in columns you aren’t using or keep the columns in any particular order. The only required column is the first one (custom post type) and other basics like title and description.
  • There are more available fields that the plugin will recognize like post date, slug, and author which you can use if you like. Refer to the plugin documentation.
  • You can add more custom fields on the end if you like.
  • By default the import sheet has columns for four sets of variations. You can add more if you need to.
  • Product categories are a little complicated. For top-level categories, you need to type: “0, Category Name”. For a second-level category, type “Category Name, Sub-Category Name”. Commas in the category name are not allowed. You can insert into more than one category at a time by putting your categories on new lines (press alt+enter to create a new line in the same cell). You are supposed to be able to add new categories during this step, but this functionality doesn’t seem to work right so you are better off to create your categories first and then just use the import process to assign them.
  • If you are creating your CSV from scratch, escape your quotes with double-quotes: ” becomes “”.
  • Sale dates must be in Unix time so it might be easier to put them in manually once your product has been added.
  • Weight must be added with a space between the lbs(kg) and oz(gm) like this: 6 4 (that’s 6lbs, 4oz). If you enter 1 it will be converted to 1lb, 0oz.
  • On variation textareas, if you want a text area that is 3 lines tall, enter 3 for the value.
  • On variations with single-line text boxes, use this structure: [character length]|[max character length]. So if you want a text box that is 50 characters wide and 200 characters max, put 50|200 in the value for that variation. Leave blank for default.
  • Important Variation Note: In FoxyShop version 3.0 the variation structure was changed significantly so that this variation import won’t work immediately. There’s a workaround, though: after importing your products go to the FoxyShop tools section in the admin and there’s a button called “Scan for Old Variations”. Click that button and FoxyShop will convert all these imported variations to the new format.

Good luck and happy importing!

16 Responses to Importing Products

Leave a Reply

Your email address will not be published. Required fields are marked *