Spree Import Products
I've used this combination of model/controller/script to add product import functionality to a couple of projects now. It's a fairly simple (but easy to extend), drop-in Spree extension that adds an interface to the Administration area that allows a user to select and upload a CSV file containing information on products.
The script portion of this extension then reads the file, creating products with associated information, and finding, attaching and saving images and taxonomies to the product object.
Adding some sort of support for running this under delayed_job is something that I think is probably reasonably necessary for a routine like this, but not something I've had time to look into.
Apart from that, just testing really.
- Add the gem to your Gemfile, and run bundle install. gem 'import_products, :git => 'git://github.com/joshmcarthur/spree-import-products.git' bundle install
- 'Install' the extension - copy a migration and an initializer rake import_products:install
- rake db:migrate
- Configure the extension to suit your application by changing config variables in config/initializers/import_product_settings.rb
- Run application!
The product import script was based on a simple import script written by Brian Quinn here. I've extended it and tweaked it to fit my needs.
Copyright (c) 2010 Josh McArthur, released under the MIT License