Spree 3.4 extension to import products from a CSV file.
Last updated on: December 10 at 06:55 PM
source code bug trackerThis extension allows users to import products from a CSV file.
Add this extension to your Gemfile with this line:
ruby
gem 'spree_products_import', github: 'secoint/spree_products_import'
Install the gem using Bundler:
ruby
bundle install
Restart your server
If your server was running, restart it so that it can find the assets properly.
CSV column | Product attribute | Processing rules |
---|---|---|
name |
name |
Processed as is |
description |
description |
Processed as is |
price |
price |
Replace commas with dots and cast to Float |
availability_date |
available_on |
Processed as is (if availability_date can't be parsed to a Date, it will be ignored) |
slug |
slug |
Processed as is |
stock_total |
master.total_on_hand |
Product master's stock total in default location is being replaced by this value |
category |
taxons |
Find existing Taxon by this value (or create one) and add it to Product |
;name;description;price;availability_date;slug;stock_total;category
;Ruby on Rails Bag;Animi officia aut amet molestiae atque excepturi. Placeat est cum occaecati molestiae quia. Ut soluta ipsum doloremque perferendis eligendi voluptas voluptatum.;22,99;2017-12-04T14:55:22.913Z;ruby-on-rails-bag;15;Bags
Copyright (c) 2017 Denis Lukyanov, released under the New BSD License
tags | spree versions |
---|---|
master | >= 3.4.0, < 4.0 |