joshmcarthur / spree-import-products

A Spree extension to allow users to batch upload Products from a CSV file using Delayed Job
http://spreecommerce.com/extensions/103-import-products
BSD 3-Clause "New" or "Revised" License
80 stars 99 forks source link

can't rake import_products:install #7

Open Sashe opened 12 years ago

Sashe commented 12 years ago

When I trying rake import_products:install I get in CLI

INFO: Mirroring assets from /home/sashe/.rvm/gems/ree-1.8.7-2011.03@store/bundler/gems/spree-import-products-b845ab7808a8/lib/tasks/../../db to /home/sashe/Sites/synergy_app/db NOTE: This extensions uses delayed job - you need to generate additional migrations for this gem by executing `rails generate delayed_job_migrations' INFO: Mirroring assets from /home/sashe/.rvm/gems/ree-1.8.7-2011.03@store/bundler/gems/spree-import-products-b845ab7808a8/lib/tasks/../../public to /home/sashe/Sites/synergy_app/public Could not mirror /home/sashe/.rvm/gems/ree-1.8.7-2011.03@store/bundler/gems/spree-import-products-b845ab7808a8/lib/tasks/../../public - entity does not exist

how to solve this problem?

joshmcarthur commented 12 years ago

Hi Sashe - thanks for noticing this - I'm surprised it hasn't come up before now. The problem here is that the rake task that Spree generates when creating an extension automatically adds a task for copying the public directory into your project (the public directory would normally contain images, stylesheets etc). Since there isn't any of that stuff here, there is no public folder in the gem - hence the error.

I've committed a fix which should work for you - give it a go, and let me know how you get on :-)

Sashe commented 12 years ago

it works fine now, thank you! But I don't fully understand how to use you gem. I can create simple product with description, SCU, etc. But how to create variants of this product differ by size and SKU??

Sashe commented 12 years ago

having in csv column "Размер", uploading file, variant creating

[2011-10-05 15:49:01] [Info] Importing products for test1.csv began at 05.10.2011 - 15:49 [2011-10-05 15:49:01] [Info] ТРАНСФОРМЕР3 [2011-10-05 15:49:01] [Info] ТРАНСФОРМЕР3 successfully imported.

[2011-10-05 15:49:02] [Info] Variant of SKU 00000059 successfully imported.

[2011-10-05 15:49:02] [Info] Variant of SKU 00000060 successfully imported.

[2011-10-05 15:49:02] [Info] Variant of SKU 00000061 successfully imported.

[2011-10-05 15:49:02] [Info] Importing products for test1.csv completed at 05.10.2011 - 15:49 [Worker(host:sashe-laptop pid:11731)] ImportProducts::ImportJob completed after 1.7197 [Worker(host:sashe-laptop pid:11731)] 1 jobs processed at 0.5475 j/s, 0 failed ...

but in product variants ..... nothing!!! what I do wrong?

joshmcarthur commented 12 years ago

HI Sashe - that looks weird, as if you take a look at https://github.com/joshmcarthur/spree-import-products/blob/master/app/models/product_import.rb#L140 you'll see that that message shouldn't be logged until the variant has been successfully created.

I suggest that you take a look in the console on the product's your importing, as this is a better raw data source - have a look, and see if a) those variants have actually been created and saved, and b) that they are correctly associated with the product.

Let me know how you get on!

Sashe commented 12 years ago

I time 50 have altered the.csv a file and have earned like. It is possible to write requirements to a file marking?