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

About multiple variants #28

Open
ghost opened this issue Aug 20, 2014 · 1 comment
Open

About multiple variants #28

ghost opened this issue Aug 20, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 20, 2014

Hello.
For our current project we're collecting some information about products from one web store and each product from that store has many variants (about 5-10), so we thought the way that you suggest in wiki in which we should place info about all variants of one product in one single line in csv file is quite inconvenience, so we decided to try to add to csv file variants of one product line by line (for example: first line is a base product, second line is a variant of this product), but, as we could expect - it didn't work (got this error Spree::Product#master_images delegated to master.images, but master is nil and many others), so, if you can help us - please help.
P.S This is an example of what we tried to do
screen shot 2014-08-21 at 01 09 03

@autotelik
Copy link
Owner

Since setting the id manually would over ride automatic
auto-incrementing and may clash with existing table entries this is not something I have ever implemented
so setting id to 600 will not work

I've not actually tried this myself but if you want to create Product first then assign Variants perhaps
3 steps required, load all the master products,
use general datashift export to get their ids and then assign :product_id to your Variant spreadsheet
and load  the 2nd Spreadsheet with general datashift load, specify model Spree::Variant rather than Product

but since you can specify as many multiple Variant columns as reqd, see this example

https://github.com/autotelik/datashift_spree/blob/master/spec/fixtures/SpreeProductsMultiColumn.csv

Variants
, Variants,
Variants
designer: aphex, designer: autechre ; designer: slowdive

not sure why this is inconvenient

cheers tom

albums   : http://aqwan.bandcamp.com
all music:http://soundcloud.com/aqwan


From: Tyomsa [email protected]
To: autotelik/datashift_spree [email protected]
Sent: Wednesday, 20 August 2014, 23:15
Subject: [datashift_spree] About multiple variants (#28)

Hello.
For our current project we're collecting some information about products from one web store and each product from that store has many variants (about 5-10), so we thought the way that you suggest in wiki in which we should place info about all variants of one product in one single line in csv file is quite inconvenience, so we decided to try to add to csv file variants of one product line by line (for example: first line is a base product, second line is a variant of this product), but, as we could expect - it didn't work (got this error Spree::Product#master_images delegated to master.images, but master is nil and many others), so, if you can help us - please help.
P.S This is an example of what we tried to do


Reply to this email directly or view it on GitHub.

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