A Spree extension to allow users to batch upload Products from a CSV file
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 12 commits ahead, 26 commits behind joshmcarthur:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db/migrate
lib
spec
.gitignore
LICENSE
README.md
Rakefile
import_products.gemspec

README.md

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.

TODOs

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.

INSTALLATION

  1. Add the gem to your Gemfile, and run bundle install. gem 'import_products, :git => 'git://github.com/joshmcarthur/spree-import-products.git' bundle install
  2. 'Install' the extension - copy a migration and an initializer rake import_products:install
  3. rake db:migrate
  4. Configure the extension to suit your application by changing config variables in config/initializers/import_product_settings.rb
  5. Run application!

ATTRIBUTION

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