Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is it possible to create/update existing variants and products? #19

Open
davidtingsu opened this issue Jun 11, 2013 · 0 comments

Comments

@davidtingsu
Copy link

My use case is to import a spreadsheet with products and their master variants (also which variant becomes master), updating any existing records in the database.

Update
I've been getting this error but figured out this is because one of my column headers is empty.

*** NoMethodError Exception: undefined method `operator' for nil:NilClass
(rdb:1) puts e.backtrace.join("\n")
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift-0.13.0/lib/loaders/loader_base.rb:288:in `prepare_data'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift-0.13.0/lib/loaders/csv_loader.rb:7in `each_with_index'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift-0.13.0/lib/loaders/csv_loader.rb:74:in `block (2 levels) in perform_csv_load'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift-0.13.0/lib/loaders/csv_loader.rb:55:in `each'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift-0.13.0/lib/loaders/csv_loader.rb:55:in `each_with_index'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift-0.13.0/lib/loaders/csv_loader.rb:55:in `block in perform_csv_load'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift-0.13.0/lib/loaders/csv_loader.rb:52:in `perform_csv_load'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift-0.13.0/lib/loaders/loader_base.rb:118:in `perform_load'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift_spree-0.5.0/lib/loaders/spree/spree_base_loader.rb:49:in `perform_load'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift_spree-0.5.0/lib/loaders/spree/product_loader.rb:46:in `perform_load'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/datashift_spree-0.5.0/lib/thor/spree/products_images.thor:65:in `products'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor/runner.rb:36:in `method_missing'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor/command.rb:29:in `run'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor/command.rb:128:in `run'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/gems/thor-0.18.1/bin/thor:6:in `<top (required)>'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/bin/thor:19:in `load'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/bin/thor:19:in `<main>'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/bin/ruby_noexec_wrapper:14:in `eval'
/Users/<user>/.rvm/gems/ruby-1.9.3-p429@<namespace>/bin/ruby_noexec_wrapper:14:in `<main>'
nil'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant