Magento Data Import

I’ve been working on a project to move a products from X-Cart into Magento. There are too many products to just add them by hand, so I wanted to find a way to import them into Magento. It took many times of trial and error, but here is how I got the information I needed out of X-Cart and into Magento.

  1. Categories
    The first thing I did was to create my category structure in Magento. This was a little tricky as I discovered the client’s existing category structure wouldn’t be as elegant in Magento as Magento has a lot more options than X-Cart. So, with a bit of refining, I created the categories and sub-categories.
  2. Trial Products
    Next up, I created a couple of trial products based on the out-of-the-ordinary products that this client had. Once I figured out how to accommodate all of the special cases, I created products for each different case.
  3. Test Export
    I now did a test export from Magento to see how these fields needed to be formatted for Magento to bring them in correctly.
  4. Reconfigure
    Then, I reconfigured the export from X-Cart to match the new formatting I needed.
  5. Quick PHP Fix
    At this point, I had to increase the upload allowance for PHP. It was originally set to 2MB, and lucky me, my exported file was 2.1MB.
  6. Import Errors
    Even though I thought I had everything set, Magento was complaining about the X-Cart file. It was giving me a “Duplicate column names” error. I finally figured out after a lot of trial and error that the importer was reading empty columns at the end, which had no column names, which therefore meant there were duplicates of the blank colunn name. I opened the X-Cart export file in Excel, copied the real data columns into a brand new sheet (for some reason, just deleting the empty columns didn’t fix the issue), and saved a new copy of the file.
  7. More Import Errors
    The next error I got was “Empty required field” and “Misspelling in Category name”. These ended up being an encoding issue. I opened up the exported file in Komodo Edit and saved the file as UTF-8. No more errors.
  8. Image Uploads
    To start, I had to create a profile for the image upload. Then, I placed the images in the media/import directory and ran the image upload profile.

I now had a working import which brought in all the X-Cart products and even handled the special cases pretty well.