19 replies [Last post]
mrbnet's picture
Offline
Joined: 04/08/2008
Juice: 33
Was this information Helpful?

I am in the process of changing my site over from oscommerce to ubercart. I am struggling with the import feature and would like to update my products on a daily basis. I convert my feed into a compatible ubercart xml file. It appears to import all the items but it orphans them all. Does anyone have any insight as to automatically creating categories for the products. I am working with about 200 categories and 200,000 products.

Thanks,
Ryan

doomed@drupal.org's picture
Offline
Bug Finder
Joined: 04/05/2008
Juice: 334
Re: Product Import

Checkout the end of this thread, see if it helps

http://www.ubercart.org/forum/support/4483/importing_new_list_productspr...

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
node_import

Yes, using the drupal node_import module with the ubercart's uc_product.inc works well.

see: http://drupal.org/project/node_import

uc_product.inc is available somewhere in this forum.

The only issue I found with node_import is that I can't import the images. There is a cck images patch to fix this, but I could not get it to work.... See: http://drupal.org/node/143471

gthing's picture
Offline
Joined: 12/13/2007
Juice: 30
Re: node_import

Did you try the latest incarnation of that patch?

http://drupal.org/node/143471#comment-786257

I'm not entirely sure how to load a patch myself, so I'll play around with it a bit.

goodeit's picture
Offline
Joined: 05/28/2008
Juice: 322
Re: node_import

I got image import to work with an old version (1.2) of node_import and konsumer's original patch. This works wonderfully, except I have never been able to get taxonomy terms created under the catalog term through any import program...

good luck

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
Re: Product Import

Well, I have always got taxonomy to work with node_import 5.x-1.6.

The taxonomy term should be a column in the csv file, and I map this to "Taxonomy: Catalog" during the import.

Multiple terms can be separated by pipe "|" sign in a csv file, assuming your fields are comma separated e.g. assuming you had products that could be classified as Term1 & Term2, then in the Taxonomy field you should have:

.....,"Term1|Term2",...., [see the readme.txt file unde modules/node_import]

I am running Taxonomy 5.7. & Taxonomy Menu 5.x-1.03 with drupal 5.7

So the only outstanding things for me are:
1. Image imports with node_import 5.x-1.6 [I have not had another go at the patch...]

2. Speed - see my support request on:
http://drupal.org/node/270584

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
Re: Product Import

By the way, I just tried the image cck patch again on node_import 5.x-1.6 and got it to work!

A few comments:
- node_import/supported/cck/content.inc is the file that needs to be patched

- you then need to edit the patched content.inc and make this change after finding line with unset($node->$dummy_name):
//unset($node->$dummy_name)

- images need to be placed in the files directory, under your drupal installation.

- in the csv file, put name of image as a separate field e.g. if image is files\image1.gif, then only put image1.gif in field

- during import, map the image field to the "Image Fid (field_image_cache)" field.

After this it worked for me...

I am using ImageField 5.x-2.0-rc8, and all the Image modules 5.x-1.8, ImageCache 5.x-2.0-rc2, cck 5.x-1.5

steklobiz's picture
Offline
Joined: 01/28/2008
Juice: 26
zeezhao wrote: - you then
zeezhao wrote:

- you then need to edit the patched content.inc and make this change after finding line with unset($node->$dummy_name):
//unset($node->$dummy_name)

There are 3 such lines in content.inc! Which one?

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
Re: Product Import

There is only one instance for me... after applying the patch. Using node_import 1.6
file is node_import/supported/cck/content.inc

Also, I used this patch: node_import_imagefield_support_0.patch
(see http://drupal.org/node/143471#comment-786257)

Did not try latest patch or any other one....

steklobiz's picture
Offline
Joined: 01/28/2008
Juice: 26
Re: Re: Product Import

I can't understand, what I'm doing wrong. Can you upload already patched content.inc file?

Thanks.

kanted's picture
Offline
Joined: 08/12/2008
Juice: 2
node import for ubser cart with images

We did all but still unsuccessful , we are using Druapal 5.8 with node import 1.6 , image cache and other all image modules and we end up in white screen can any one help or give us the content.inc

Great Help's Really Helps Smiling
kanted

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
content.inc

I have attached it, but note that I am using:

- drupal 5.7, ubercart 5.x-1.0-rc4

- ImageField 5.x-2.0-rc8 and all the Image modules 5.x-1.8, ImageCache 5.x-2.1, [all not officially supported by ubercart...]

- cck 5.x-1.5

- php 5.1.1, mysql 5.0.18

- it also depends on your version of php etc.

So I wont be able to help debug any issues or give further advice... So you are using it at your own risk. Thanks.

AttachmentSize
content.zip 3.18 KB
giorgio79@drupal.org's picture
Offline
Joined: 02/02/2008
Juice: 280
Thanks for the info. Should

Thanks for the info.

Should I be seeing the images on preview?

I noticed on node import I have an option like Product:Main Image. Although setting the file name equal to this did not help so I am trying as you suggested by putting filename into imagecaceh fid

giorgio79@drupal.org's picture
Offline
Joined: 02/02/2008
Juice: 280
Success I can confirm that

Success Smiling

I can confirm that I successfully imported images with your content.inc and I could not see the images on preview, yet once imported all was fine Smiling

Cheers,
G

a_c_m@drupal.org's picture
Offline
Bug Finder
Joined: 01/02/2008
Juice: 288
Re: Success I can confirm that
zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
Re: Success I can confirm that

giorgio79 - Great that you got it to work!

Yes, the preview never shows the images... Not critical since we know they get loaded.

How many did you load, and what was performance of loads i.e. how many nodes per min or hr?

Arakrys's picture
Offline
Joined: 10/03/2008
Juice: 11
Re: content.inc

I would really like to know what I should put in the csv file as file name, and where to place the files when importing with these files. For now the fields just get empty when importing the filename into the _fid fields.

Another semi related issue: I made boolean fields for a single checkbox in the product and I placed 1's in the csv file (non quoted). These got lost as well. When entered in a text field it went ok but in the long run I fear this will bite me in the proverbial tail.

edit: so the source images are to be put in the /files directory but the system is a bit whacky when Drupal is installed in a sub sub sub directory...

c0psrul3's picture
Offline
Joined: 10/07/2007
Juice: 95
NULL values in content_field columns

i get an fid for each file in the files dir but columns to associate the file with the node are left NULL

any suggestions?

enlighten_me's picture
Offline
Joined: 04/25/2008
Juice: 83
Re: content.inc

Great patch!

The multiple terms import doesn't work for me. My fields are separated by the pipe sign, so for a field "Year", my data would be something like "2006|2007|2008". The field is a Text Field and not a CCK List since CCK lists don't seem to import.

My field separator is a tilda "~", but looking at the content.inc code, this doesn't seem to matter.

cwittusen's picture
Offline
Joined: 01/30/2008
Juice: 86
hierarchy terms

Hi Everyone:
I have been looking high and low all over for how to formulate my csv file when I have a hierarchy term built up as listed below; if anyone can tell me and help me save a couple of brain cells I would greatly appreciate that.

We have the Catalog taxonomy that is common in in ubercart below it our structure looks like this (baby clothing store) and I'm trying to get 200 products loaded but I'm getting stuck at putting it into the right term area. Currently it ends up both in "Baby boy and Baby girl" when I use the csv structure as followed:
"Name", "SKU", "Category", "Price"
"Pants", "1234", "Baby boy|Top|0-3 months", "$5"

Category layout:

Baby boy
- Top
- 0-3 month
- 3-6 month
- 6-9 month
- Bottom
- 0-3 month
- 3-6 month
- 6-9 month
Baby girl
- Top
- 0-3 month
- 3-6 month
- 6-9 month
- Bottom
- 0-3 month
- 3-6 month
- 6-9 month

Thank you in advance
Chris W