SpreeDatashiftProdImport

This spree extension allows admin to import Products, Variants, Users, Orders etc using a CSV file including all associations. This also supports import of Products through a .xls file.

Installation

  1. Add following to your Gemfile:
  gem 'spree_datashift_prod_import', github: 'vinsol-spree-contrib/spree_datashift_prod_import', branch: <spree-version-compatible>
  gem 'datashift_spree', github: 'vinsol-spree-contrib/datashift_spree', branch: '3-2-stable'
  gem 'datashift', github: 'vinsol-spree-contrib/datashift', branch: '3-2-stable'

The branch option is important: it must match the version of Spree you're using. For example, use 3-1-stable if you're using Spree 3-1-stable or any 3.1.x version.

  1. Install the gem using Bundler:
  bundle install
  1. Copy & run migrations
  bundle exec rails g spree_datashift_prod_import:install
  1. Restart your server.

Features

  1. Import

    • Allows importing of Products, Variants, Taxons, Orders, Shipping Categories, Stock Locations, Users and their Addresses etc.
  2. Transform

    • Allows easy transformation of Shopify Products data into Spree Models.
  3. Reset Data

    • Allows admin to clear all Products, Variants, Images, Orders, Users, Shipping Categories etc from the system.
    • *Note It is recommended only if you want to build the system from scratch as you would loose all your data related to the application.

Working

  1. For Importing Users.

    • Go to Admin >> Imports >> Users
    • Click on Import Users button.
    • Now either upload your own CSV file having the headers in the format present in sample file or start importing with the sample data.
  2. For Importing Products.

    • Go to Admin >> Imports >> Products
    • Click on Import Products button.
    • Now either upload your own CSV file having the headers in the format present in sample file or start importing with the sample data.
  3. For Importing Users.

    • Go to Admin >> Imports >> Orders
    • Click on Import Orders button.
    • Now either upload your own CSV file having the headers in the format present in sample file or start importing with the sample data.

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories.
Simply add this require statement to your spec_helper:

require 'spree_datashift_prod_import/factories'

Credits

vinsol.com: Ruby on Rails, iOS and Android developers

Copyright (c) 2014 vinsol.com, released under the New MIT License

Comments

No comments yet

Please login to add comment.