Import Products

marc8bitmarc8bit Member
in Bugs & Feature Requests edited January 2008
Is there a way to do a mass import of products from a CSV file? I have a client who will be adding about 400 products or so and needs to do a mass import if possible.
Comments
  • brettbrett FoxyCart Team
    Hi marc8bit.
    What system (CMS) are you using for your site? Since FoxyCart doesn't actually maintain any sort of product catalog (with the exception of downloadable products) it's really more a question for how you're building your site. For example, I know at least one or two people that have done CSV imports into MODx. You also might want to check out CoolCommerce for ExpressionEngine (which I don't think has a CSV import but you might be able to roll your own).

    Does that help? Let me know if that's not clear.
  • Man i feel so web 1.0 :) I am using MODX so doing a csv import should be easy!
  • brettbrett FoxyCart Team
    Oh thank goodness ;)
    Let us know how it goes.
  • Are there any tutorials on this or anywhere to begin? I'd love to move some of my stores to ModX + FoxyCart!
  • lukeluke FoxyCart Team
    Not that I know of... but you can always use phpMyAdmin or something similar to import records directly into your own database table and then write your own php to go through the data and create pages and template variables as needed. This sounds complicated, but with a little php / mysql knowledge, it's not too bad. I did something similar to "import" all the churches that are part of the church directory at http://www.everynation.org.

    I hope that points you in the right direction. If you need to hire a consultant to get things going, you may have luck checking in the MODx forums.

    Either way, let us know how it goes and what we can do to help serve you better.
  • Hi cmlawson,

    Once you understand the data structure for MODx its easy to import data into it. I used pages to list each product in my site as it made it very easy for my client to update information using TVs. I used a nice little tool called "SQL Converter 2 for Excel" to allow me to download the data from the old site and reformat the columns to match MODx structure.

    The key to remember is that any TVs are stored separately from the page itself. What you want to do is give the product pages their own page template, upload all your products, than pull all their new IDs found in the _site_content table. With those IDs you can assign values for each TV in _site_tmplvar_contentvalues, with "contentid" being the _site_content ID, "tmplvarid" being the TV id, and "value" being the value.

    So in my case product_price is a TV with an ID of 14. You can find your TVs in _site_tmplvars

    I used phpMyAdmin to pull and import all the data and it was a easy. If you need any more help feel free to email me at [my username] at gmail.

    Bdogsputnik
    FoxyFan
  • lukeluke FoxyCart Team
    bdog, you rock.

    Great post. Thanks so much for helping out the Foxy community.
Sign In or Register to comment.