The node_import module + the UC add-on

Posts: 59
Joined: 08/18/2007

Hi,

This post if for those who are still looking for a way to import products via CSV.

CKOWORKS, posted a great add-on to the Drupal CSV node_import module. You can get it here: http://www.ubercart.org/comment/7642/node-import-add

It is not working properly for me since I updated to Beta 2, but it has been working great.

I cannot upload all the info I need, so I still have to edit each product after I run the upload. But it handles CCK nicely. I'm sure it could be modified to handle more complex products.

I'd be interested to know if anyone is have successes using this method?

Cheers.

Posts: 13
Joined: 01/23/2008

hello,

I have ubercart 5.x-1.0-beta4 and very interesting with this add-on. I test this soon and write feedback here...

Posts: 59
Joined: 08/18/2007

I get this error when importing products, since the upgrade to Beta 2.

user warning: Unknown column 'required' in 'field list' query: INSERT IGNORE INTO uc_product_attributes (nid, aid, ordering, required, default_option) SELECT 154, aid, ordering, required, default_option FROM uc_class_attributes WHERE pcid = 'product_general' in /users/home/kolke/domains/kissandmakeupstore.com/web/public/includes/database.mysql.inc on line 172.

Posts: 822
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

That was a bug in the install/update of uc_attribute that's fixed in beta 4.

--

<tr>.

Posts: 13
Joined: 01/23/2008

I'm do some test and basically that work...

BUT i see right now two problems:
-if you have a lot of product perhaps you exceed the time limit. See this bug of node import: http://drupal.org/node/191197

-You don't be able to map the three dimensions fields. I don't know why... but a really simple workaround is to add your costume CCK field for dimension.

I need some more test to understand how to import taxonomy hierarchies http://drupal.org/node/162474

Posts: 46
Joined: 11/22/2007

If more then one taxonomy, you need to pipe them... cat1name|cat2name
next to the error noted by , I don't really see problems.. if any, post them here, I'll try to have a look...

Posts: 59
Joined: 08/18/2007

The update to UC Beta 4 took care of the error message.

Also, thanks for the tip about putting a pipe between multiple taxonomy terms.

Has anyone had success with attaching images?

Cheers.

Posts: 13
Joined: 01/23/2008

Yeah thanks for the pipe trick. If your term is already present pipe are not necessary!

TimK wrote:
Has anyone had success with attaching images?

Yes after a lot of googling (sometimes google is not your friends...) i found a patch to import cck image field: http://drupal.org/node/143471

Posts: 13
Joined: 01/23/2008

Big success with image import like i write here: http://drupal.org/node/143471#comment-720821

Now i search a solution to import 17'000 products and deal with time limit (30 second :/). I test with set_time_limit... that's work but some server don't allow this function.

...final step for me Smiling.

Posts: 59
Joined: 08/18/2007

Hey. Still no luck with importing images. I tried applying the patch to the module. I am having the same issue as other users with images showing up in preview but not in the node view. http://drupal.org/node/143471#comment-804900

I am using just the image name (e.g. image.jpg) in the CSV field that maps to fid, not the full url of the image. I leave image alt and image title blank.

Also: I did have to set my default content filter to full HTML to get it to work.

Any Ideas. Thanks.

Posts: 71
Joined: 04/05/2008
Bug Finder

TimK wrote:
Hi,

This post if for those who are still looking for a way to import products via CSV.

CKOWORKS, posted a great add-on to the Drupal CSV node_import module. You can get it here: http://www.ubercart.org/comment/7642/node-import-add

It is not working properly for me since I updated to Beta 2, but it has been working great.

I cannot upload all the info I need, so I still have to edit each product after I run the upload. But it handles CCK nicely. I'm sure it could be modified to handle more complex products.

I'd be interested to know if anyone is have successes using this method?

Cheers.

Well thanks TimK, this looks good.

Tell me, for a new shop that has a simple list of products with no attributes (just the sku, name and price), what are the required fields ?

I mean which fields should i have on my CSV file before i jump into the import train ?

Posts: 71
Joined: 04/05/2008
Bug Finder

To answer my own question, i just imported a list of new products with just 3 fields and apparently it worked well Smiling

My CSV file had these 3 columns:

- SKU
- NAME
- SELLING PRICE