Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Dear drupal 5 to our colleague did support the importation of product into ubercart http://www.drupal.ru/node/17859 (not upgrade module). There was a pressing ubercart for drupal 6, please turn on the module support imports for ubercart 2.
Comment | File | Size | Author |
---|---|---|---|
#156 | tape test.xls | 1.09 MB | maaak |
#150 | sample.txt | 26.23 KB | Typeface |
#141 | extStore-all-500.txt | 567.19 KB | deggertsen |
#141 | node_import-node_product-2.txt | 68.26 KB | deggertsen |
#138 | node_import-ubercart-extensions_v6.tar_.gz | 164.45 KB | j0rd |
Comments
Comment #1
doughold CreditAttribution: doughold commentedI would love to see importing enabled as I have a client I am developing a site for and was just going to hack my way around until I made something that was functional for them. I have to finish the site in the next week so I would LOVE it if this could be done soon.
Edit: I am currently working on the import module for UC. I realize node import is still highly under development, but I have the basics working on the import. I will post it when it is further along in development for review.
Comment #2
Robrecht Jacques CreditAttribution: Robrecht Jacques commentedWhat exactly do you wish to import? uc_product? Can you attach a sample CSV file (10 rows or so) to easy testing? Thanks.
Comment #3
Gumk-1 CreditAttribution: Gumk-1 commentedHere, please. You can also watch a video like this to work on drupal 5 _http://tochka-starta.ru/big_files/node_import_for_uc.swf.
Comment #4
warrenscott CreditAttribution: warrenscott commentedHere is the file I have been trying. Can get to mapping fine but the proper mapping fields are not available
Comment #5
doughold CreditAttribution: doughold commentedI used this modified version of the D5/UC1 code and was able to import a bunch of products. It only has the basic fields, and no attributes.
Comment #6
snepa CreditAttribution: snepa commenteddoughold,
Are you working with:
Robrecht Jacques' node_import-6.x-1.0-rc3 version (http://drupal.org/project/node_import)
or
tanoshimi's node_import-6.x-dev version (http://drupal.org/node/207738)?
I'd like to give your modified uc_product.inc file a try. I desperately need to import products (don't need attributes) into Ubercart 6.x-2.0-beta4/Drupal 6.9.
snepa
Comment #7
snepa CreditAttribution: snepa commenteddoughold,
Sorry. I've gotten a bit turned around trying to follow the threads.
This discussion is identified with Jacques' version - node_import-6.x-1.x-dev.
rc3 or 1.x-dev?
I think from reading Robrecht's responses on other threads that rc4 is close. I'm not savvy or experienced enough to be working with dev versions yet.
snepa
Comment #8
ferrangil CreditAttribution: ferrangil commentedSubscribing... very interested in node_import for ubercart 2 and drupal 6.x
Comment #9
doughold CreditAttribution: doughold commentedHey, sorry for not posting this earlier, I am using the rc3 version, Drupal 6.9, and UC Beta 4
Comment #10
BeatnikDude CreditAttribution: BeatnikDude commentedThanks all, Node Import support for Ubercart 2 and Drupal 6.x would be very useful.
I am using: PHP 5.2.6, D6.9, Ubercart 6.x-2.0-beta4, Node Import module 6.x-1.0-rc3
With the uc_product.inc include from doughold @ #5 I was able to import Ubercart products from a CSV. I did not import images.
Comment #11
drdmmr CreditAttribution: drdmmr commentedI set up my D6 site with Ubercart 2.x and I cannot get the products to import using the node_import: I spent some time today reading others posts about the same problem. I am happy to work on a solution, but I don't want to do parallel dev work on this.
I'm going to research all that occurs (in DB) when I add a product and see if I can come up with a batch solution. If anyone can put me in touch with anyone that may have some insight/interest in this effort, please hook us up.
Comment #12
lbrown CreditAttribution: lbrown commentedSubscribing.
I have been watching the node import thread for ubercart 2 support for quite some time. I am anxiously awaiting it in order to upload a few hundred products and photos.
A paypal donation will be made upon support of Ubercart 2 with drupal 6.9
Thank you to all who are working on this module.
Lena Brown
Comment #13
drdmmr CreditAttribution: drdmmr commentedI am using D6.9 and UC 2.0-beta4
This is a workaround. I've successfully imported a CSV file of products and got images to show up in my catalog.
This is my procedure:
Copy all images to sites/default/files
import data from CSV file, using the node_import (images and taxonomy* fail as expected).
*I just leave this out of the import to avoid the slew of errors.
Using a 'Drupal bootstrapped' PHP script, I convert my CSV file into an associative array (by model). I read the uc_products table, 1 row at a time, (db_fetch_object) gathering the model, nid and vid for each record.
Using the model, I get the image field from my CSV data.
After determining the mime and filesize, I insert all this (along with the path) into the files table and fetch the corresponding fid.
With all this data, I update the content_field_image_cache table:
nid = $nid
vid = $vid
field_image_cache_list = 0
field_image_cache_fid = $fid
field_image_cache_data = 'a:0:{}';
and call drupal_flush_all_caches();
When I refresh my Drupal site, I see my catalog with all my images!
I'm fairly new to this stuff and I'm sure there's a much more "Drupal" approach than this hack (which I will work on forthwith). I needed this functionality, my site appears to work fine, and I wanted to share my success with other folks who need this as well.
I'm now working on getting the taxonomy importing as well.
Doug
Comment #14
drdmmr CreditAttribution: drdmmr commentedUsing the same Drupal bootstrapped code, I add the taxonomy terms from the CSV file for each node (with hierarchy). There is still some manual labor involved that I am working on automating, but basically I do have a procedure for importing products from a CSV file (with images and hierarchical taxonomy) in Ubercart 2.
Comment #15
hutch CreditAttribution: hutch commentedSubscribed: a very interesting development, I would like to see your code so far, I might be able to chip in here ;-)
Comment #16
doughold CreditAttribution: doughold commentedFYI: The new dev snapshot contains code for product imports (including images!), but I cannot get taxonomies to import as of yet.
I get these errors:
* warning: mb_strlen() expects parameter 1 to be string, array given in /var/clients/client0/web22/web/includes/unicode.inc on line 404.
* warning: mb_strlen() expects parameter 1 to be string, array given in /var/clients/client0/web22/web/includes/unicode.inc on line 404.
* warning: mb_strlen() expects parameter 1 to be string, array given in /var/clients/client0/web22/web/includes/unicode.inc on line 404.
* warning: mb_strlen() expects parameter 1 to be string, array given in /var/clients/client0/web22/web/includes/unicode.inc on line 404.
* warning: mb_strlen() expects parameter 1 to be string, array given in /var/clients/client0/web22/web/includes/unicode.inc on line 404.
* warning: mb_strlen() expects parameter 1 to be string, array given in /var/clients/client0/web22/web/includes/unicode.inc on line 404.
* warning: mb_strlen() expects parameter 1 to be string, array given in /var/clients/client0/web22/web/includes/unicode.inc on line 404.
* warning: mb_strlen() expects parameter 1 to be string, array given in /var/clients/client0/web22/web/includes/unicode.inc on line 404.
* Manufacturer (key=9, weight=0) field is required.
* Room (key=7, weight=0) field is required.
* Wood Type (key=8, weight=0) field is required.
* Category is required.
Where the last four lines are Vocabularies.
Edit: I deleted my vocabularies and re-created them and the errors are no more! Since this might be a bug still I will leave my errors up.
Comment #17
cjdavis CreditAttribution: cjdavis commentedsubscribing. We have a huge need for node_import with UC2, it sounds as if we should be testing the latest dev release.
Comment #18
Robrecht Jacques CreditAttribution: Robrecht Jacques commentedUbercart 2 (uc_product only) has been added to CVS. It will be included in the next release -rc4.
For the taxonomy problem ... I'll need to investigate so I've opened a new issue: http://drupal.org/node/383926
Comment #19
cjdavis CreditAttribution: cjdavis commentedThat is fantastic news, a thousand thank yous.
We will have several thousand items to import over the next couple of months, with a couple dozen CCK fields, so it will get a good testing. So far with the first couple of items, it is successful.
Thank you!
Comment #20
hutch CreditAttribution: hutch commentedI fetched the CVS version and it imports fine.
However I want to be able to either skip or update any records that already exist as defined by the 'model' field, with something like
Any ideas welcome
Comment #21
Robrecht Jacques CreditAttribution: Robrecht Jacques commentedI know people are waiting for update capabilities, but this is not as easy as it seems:
1. How does one know what node to update? For Ubercart the SKU is probably the way to go, but for other node types, one would need Title or some other CCK field. So there is a need to set that as an option. Note that this is the easy part.
2. What exactly needs to be done? Does one want to remove all modifications made by web? Does one want to add the submitted values or totally replace them? Or merge? Etc. This is the hard part.
I am investigating on how to do it, but at the moment I want to get a 1.0 release out that works reliable with importing, and I need to postpone updating until that works.
Comment #22
hutch CreditAttribution: hutch commentedI understand the need to get importing functioning first, I will knock up a bootstrap script for my needs in the meantime.
Comment #23
ferrangil CreditAttribution: ferrangil commentedYes, please, first focus on node_import and not node_update :)
By the way, there are options for updating, for example, the prices of your products in a easy way:
If you have an excel file with two columns, the SKU and the new price, just add the following 'text' and then save all the lines together as a .sql and run that file on phpmyadmin or whatever you have to access the DB.
Commands should look like:
update uc_products set sell_price='30.000' where model='ARL0014'
Where ARL0014 is the SKU of your product and 30 is the new price. This a really fast method to update several hundred prices in a batch mode. And asking for a 2 column excel file with the new prices is an easy tasks that non-developers will be able to do straight away.
Comment #24
doughold CreditAttribution: doughold commentedUpdating is definitely key when talking about managing products. However, I agree that a stable primary release should be the focus. Thanks for all of your efforts Robrecht, they are greatly appreciated!
Comment #25
zeezhao CreditAttribution: zeezhao commentedHi. When I run with the very latest node_import-6.x-1.x-dev.tar.gz (February 27, 2009 - 00:15) I get this error after "Set file options (step 3 of 8)", choosing the appropriate format (pipe delimited), and pressing the next button:
Fatal error: Call to undefined function uc_product_node_is_product() in ....\node_import\supported\ubercart\uc_product.inc on line 15
Please is there something else I am missing?
I assume that this version is the latest in CVS?
Thanks
Comment #26
zeezhao CreditAttribution: zeezhao commentedI updated ubercart to latest one: ubercart-6.x-2.0-beta4.tar.gz
Then moved past that stage to "Map file columns (step 4 of 8)". After pressing next button, got this error:
Fatal error: Call to undefined function date_timezone_names() in ...\modules\node_import\node_import.inc on line 308
Running drupal 6.6 with the very latest node_import-6.x-1.x-dev.tar.gz (February 27, 2009 - 00:15)
Comment #27
ferrangil CreditAttribution: ferrangil commentedI don't think this is going to solve your problem, but upgrade to Drupal 6.10 asap.
I'm importing products and images with no problems right now.
Comment #28
zeezhao CreditAttribution: zeezhao commentedIt appears to be related to a missing Date_api module. Since I was upgrading from an old version, it did not complain during upgrade.
[edit]
- Resolved by installing date module. Now works. thanks.
- only issue is that I could not get taxonomy to load automatically from the same file of products... Maybe I did not understand usageof this...
Comment #29
zeezhao CreditAttribution: zeezhao commentedPlease can someone confirm if taxonomy will now load automatically from the same file of as products i.e. its a field in the products file?
Even though latest code seems to suggest it works, I could not load any taxonomy/vocabulary. And looking at the threads I am not sure if this is still outstanding. Thanks for your help.
Comment #30
drdmmr CreditAttribution: drdmmr commentedI too cannot get taxonomy to load as part of node import (pointing a field in the products file to Vocabulary:Catalog); in fact, I get errors when I try:
warning: mb_strlen() expects parameter 1 to be string, array given in [path to drupal]\includes\unicode.inc on line 404.
I haven't investigated this in the code. Like everyone else, I'm waiting for this aspect of node_import to be working. In the meantime, however I use a Drupal-bootstrapped script to handle importing the taxonomy from the same CSV file I use for node_import (creating the hierarchy in the process), which gets me where I need to be.
I am using D6.10 Ubercart 6.x-2.0-beta4, node_import 6.x-1.x-dev (2009-Feb-26)
Doug
Comment #31
JackThompson CreditAttribution: JackThompson commentedAny progress on this? Will this work for digital goods? if so, how to tell Uber about the location of the digital goods?
Comment #32
mynode CreditAttribution: mynode commentedAre people still looking for update capability with node import? I have implemented a patch to uc_product.module that allows me to update existing products when importing products with node import.
It matches the nodes on the uc_product field 'model' which is interpreted in Drupal's ubercart module as SKU. SKU should be semantically correct for a catalog item.
I'm using:
Drupal 6.10
node_import 6.x-1.0-rc4
ubercart 6.x-2.0-beta5
The patch defines a nodeapi hook for uc_product. It is still very much an alpha so be careful.
Comment #33
asoka250 CreditAttribution: asoka250 commentedIs the issue resolved as yet?. drdmmr, can you give the workaround process that you did for importing hierarchical taxonomies from the csv file along with the products. I am not sure what are all the tables I need to deal with inorder to do it in the manual way.
Comment #34
xurizaemon@mynode, great work. Thankyou!
I posted a Drupal5 / Ubercart 1.x version of your nodeapi hook at http://www.ubercart.org/forum/development/9923/node_import_update
Note that your alpha nodeapi code above may be open to unexpected contents in the CSV file as it doesn't do any escaping for SQL. Try this instead:
Also, it's not necessary to add this to uc_product module (though that's a good place for it). I've added this to a custom module of my own, which avoids having to maintain a patched version of uc_product.
Comment #35
parul CreditAttribution: parul commentedI am using Drupal 6.9 with Ubercart beta 4. I installed node_import 6.x-rc4.
When I create a new import, for products, I see the CCK field very fine, preview works good too, but instead of going to Start Import page after Preview, the module takes me back to the starting page. The import doesn't get saved anywhere or imported either.
I have three CCK fields defined for my product - Size, Media, and Image (ImageField)
Comment #36
jork_zijlstra@hotmail.com CreditAttribution: jork_zijlstra@hotmail.com commentedI am using Drupal 6.10 with the Ubercart Drupal 6 - Ubercart 2.x and Node import 6.x-1.0-rc4 for the product import.
The problem that I got is that node import gave the error warning: mb_strlen() expects parameter 1 to be string.
So I went debugging and found out that the problem is with hierarchy for the catalog.
This is the line that causes the problem in node_import.inc line 553 (closeby)
$fieldvalues[$i] = strlen($value) > 0 ? array_map('trim', explode($hseparator, $value)) : array($value);
$fieldvalues[$i] will contain an array of terms. Only when importing it doesn't expect an array within the $fieldvalues[$i], but $fieldvalues[$i] needs to be the array.
So replace
$fieldvalues[$i] = strlen($value) > 0 ? array_map('trim', explode($hseparator, $value)) : array($value);
for
$fieldvalues = strlen($value) > 0 ? array_map('trim', explode($hseparator, $value)) : array($value);
My next problem is that when importing the product with the above fix, the product will be connected to ALL terms. I only want it to be connected to the last.
So I suspect that the seperators || and >> do not work correctly.
To go around this replace the original line with this.
$fieldvalues = strlen($value) > 0 ? $fieldvalues = array(array_pop(array_map('trim', explode($hseparator, $value)))) : $fieldvalues = array($value);
Keep in mind that these are quick fixes that works for me.
Comment #37
kilrizzy CreditAttribution: kilrizzy commented@jork Thank you this solution fixed my issue!
When trying either of the two fixes for me it only selects the last item. Is there anything I may be missing to get it to select all terms?
Comment #38
quadmin CreditAttribution: quadmin commentedErrors
SKU field is required.
Drupal version: 6.10
PHP version: 5.2.6
node_import 6.x-1.0-rc4
error file in attachment:
Comment #39
jork_zijlstra@hotmail.com CreditAttribution: jork_zijlstra@hotmail.com commented@kilrizzy
Don't do this part of the patch.
To go around this replace the original line with this.
$fieldvalues = strlen($value) > 0 ? $fieldvalues = array(array_pop(array_map('trim', explode($hseparator, $value)))) : $fieldvalues = array($value);
Normally it connects to all terms. The above code only lets it connect to the last one.
Comment #40
Prasad Shir CreditAttribution: Prasad Shir commentedsubscribing
Comment #41
samhodge1972 CreditAttribution: samhodge1972 commentedI am having the same error
* warning: mb_strlen() expects parameter 1 to be string, array given in C:\xampp\htdocs\palas_import\includes\unicode.inc on line 404.
* warning: mb_strlen() expects parameter 1 to be string, array given in C:\xampp\htdocs\palas_import\includes\unicode.inc on line 404.
The repro steps are pretty straightforward
Comment #42
Zalatar CreditAttribution: Zalatar commented**subscribing**
Comment #43
pancapangrawit CreditAttribution: pancapangrawit commented**subscribing** too :) Would be lovely to have this working!
Comment #44
CKIDOWsubscribing
Comment #45
domineaux CreditAttribution: domineaux commentedSubscribing
Comment #46
junwin CreditAttribution: junwin commentedHi,
The following value is triggering the error in $values[$fieldname]:
When passing that value to the below line:
$values[$fieldname] = array_filter((array)$values[$fieldname], 'drupal_strlen');
drupal_strlen gets an array as an argument which it is unable to process generating the strlen errors that you see.
Please try the patch let me know if it solves your problem,
Comment #47
JackThompson CreditAttribution: JackThompson commentedWhat about importing Digital E-goods. Does anyone care???
Comment #48
terryg-1 CreditAttribution: terryg-1 commentedSubscribing
Comment #49
dawick CreditAttribution: dawick commentedFor the taxonomy problem; make for multiple tags per vocabulary different columns and set your taxonomy terms as tags. This even works for hierarchal terms by undoing tags agains.
Good luck!
Comment #50
zaphod4269 CreditAttribution: zaphod4269 commentedYes, someone please enable importing of digital E-goods!
I have 2900 products i need to import into ubercart. The majority of them have PDFs that can be purchased online...
Comment #51
zaphod4269 CreditAttribution: zaphod4269 commentedI'm getting the same error when trying to import. The product nodes have no categories assigned.
warning: mb_strlen() expects parameter 1 to be string, array given in /home/toolsfor/public_html/includes/unicode.inc on line 404.
Post #49 seems to be trying to explain a solution, but the broken english is too hard to understand. Can someone translate it into something that makes sense?
and Post #46 seems to have a patch that applies to this error. Has anyone tested it?
[edit]
Tried applying the patch. Got more different errors, so reverted back to the default file.
Comment #52
zaphod4269 CreditAttribution: zaphod4269 commentedI updated to the latest dev snapshot and now the catalog categories (taxonomy) are coming in with the import.
but a new problem arose...
I tried it with a test CSV file that only has one record in it. It kept looping and importing that one record over and over.
I stopped it after it did 7 loops. In content management, I now have 7 identical products.
and there was also the following error...
* user warning: Unknown column 'file_offset' in 'where clause' query: UPDATE node_import_status SET status = 2, objid = 12 WHERE taskid = 4 AND file_offset = 2438 in /home/toolsfor/public_html/sites/all/modules/node_import/node_import.inc on line 906.
* user warning: Unknown column 'file_offset' in 'field list' query: UPDATE node_import_tasks SET status = 2, file_offset = 3982 WHERE taskid = 4 in /home/toolsfor/public_html/sites/all/modules/node_import/node_import.inc on line 915.
Comment #53
domineaux CreditAttribution: domineaux commentedI use the iMacro addin/plugin for firefox.
This is a thread about node_import and I realize my post may not fit, but I saw where someone above had 2900 product items to import.
Just as with node_import your database to import from must be "perfect" every comma, every field has to be perfect.
Getting the import data properly prepared can take days of work to get it ready.
Using the iMacro has it's quirks as well,but you don't get errors that can affect or destroy your mysql.
You can do short runs, and what you enter (wrong or right) you can easily check out or remove within Drupal admin feature.
I found out about the iMacro from another poster on these boards. It was sunshine on a rainy day. LOL
Comment #54
cjdavis CreditAttribution: cjdavis commentedThe latest dev version of ubercart has killed product imports again, at step 4 of the wizard you get the same error that zeezhao was seeing in #25 -
Which is caused by the missing uc_product_node_is_product() function. Add the following to the uc_product.inc file:
I've attached the entire file. Anybody good at generating a patch, feel free to contribute it..
Comment #55
heyyo CreditAttribution: heyyo commentedsame error than in #38
SKU field is required at step 7/8
with last Ubercart RC-4
Comment #56
xurizaemon@quadmin, @heyyo - try uc_auto_sku (is that the right version? i thought there was a d6 version too?) or add a column in your CSV with some SKU - just make an extra column with a sequential number or other unique code
Comment #57
heyyo CreditAttribution: heyyo commentedI have already a SKU column in my CSV, but on step 4/8 SKU is not listed in Content field( but I could only see SKU in "Maps to column")
Comment #58
xurizaemon@cjdavis,
uc_product_node_is_product()
is still in uc_product.module in ubercart-6.x-2.0-rc3 but does appear to have been removed in the latest 2.x-dev version.the code you posted would only work if your node types were named "product_jelly", "product_tiger", "product_underpants" (we use product node types like "magazine" and "review" and "cd"); it would also wrongly claim the type is a product if the node type is "byproduct" or "productivity" ...
UPDATE: The function has been merged with uc_product_is_product(), which will accept either a node or a string for the product type as its first parameter. Use that function instead of re-adding uc_product_node_is_product().
here's the original function from the current 2.0-rc3 (i'm not sure why this is gone from 2.x-dev, don't see a mention of its removal in CVS messages).Comment #59
heyyo CreditAttribution: heyyo commentedI tried "uc_product_power_tools" ( http://www.ubercart.org/contrib/9566 ) to generate SKU automatically, I still have the same error SKU field is required.
Comment #60
heyyo CreditAttribution: heyyo commentedWith UC auto SKU I succeeded to import data, but I didn't pay attention that
List price, Cost:, Sell price: were not present in the mapping process like SKU...
Maybe I have the wrong uc_product.inc. Could someone could point me to the last version of this file.
Or my issue is related to uc_product_node_is_product #54 #58
Thanks.
Comment #61
xurizaemon@cjdavis, I've spun that function rename off into a separate issue, because this issue has been around for ages and I'd like to get that small patch in fairly speedily.
#555202 - node_import+ubercart - function rename in ubercart-6.x-2.x-rc5 (err: undefined function uc_product_node_is_product())
Comment #62
schwascore CreditAttribution: schwascore commentedI'm having the exact same problem as heyyo. I have a SKU field in my csv upload, but there is no option to map it as being the SKU field. List price, cost, sell price are missing as well.
Please help!
Comment #63
nickcaballero CreditAttribution: nickcaballero commentedChanged the fields array in my uc_product.inc to the fields array in #4's uc_product.inc: worked right away. Also had to modify the _uc_product_node_import_is_product() (this function varies but fulfills the same purpose in all uc_product.inc) to return true at all times.
I first changed the _uc_product_node_import_is_product() which then gave me an error from the node_import.inc in the following statement:
Line 176: $fields[$type][$fieldname] = $fieldinfo = array_merge($defaults, $fieldinfo);
Apparently, $fieldinfo was not an array and hence the array_merge() failed. I looked at #4's uc_product.inc and noticed the extra array. Changed it and the field mapping now appears in step 4. Finally I was able to import :D
Comment #64
nickcaballero CreditAttribution: nickcaballero commentedComment #65
TechnoBuddhist CreditAttribution: TechnoBuddhist commentedsubscribing
Comment #66
Jakowski-1 CreditAttribution: Jakowski-1 commentedSicnic, could you maybe post your uc_product.inc file?? I'd like to compare the one I have with yours since yours works and I can't seem to get mine to do so based off your suggestions.
Comment #67
nickcaballero CreditAttribution: nickcaballero commentedThis works for me. I have to change the _uc_product_node_import_is_product when I am not importing products otherwise it fails.
Comment #68
zigen CreditAttribution: zigen commentedSubscribing
Comment #69
MaierWerx CreditAttribution: MaierWerx commentedI've been trying to get node_import to work with Ubercart 2 for some time now, and I can't seem to come up with the right combination of files/fixes/patches/versions. I will appreciate any assistance anyone can provide. I've read through all the posts, tried the various fixes/patches/versions etc... alas, I still cannot import Ubercart products.
I am using all the current versions available:
Drupal 6.14
Ubercart 6.x-2.0-rc7
Node import 6.x-1.x-dev
Currenty, I can run through the entire process and everything works great right up to the Preview (Step 7)... But then I hit "Next", and it just brings me back to the start page; nothing happens; it does not import or give me any error messages. I did notice that the "Next" button at the bottom of the page (on Step 7 (preview)) is dead (it doesn't do anything when clicked).
Can anyone provide any insight? Which versions/patches should I be using? I really appreciate everyone's hard work, and would be very grateful if we could get something working.
Thanks!
Comment #70
zeezhao CreditAttribution: zeezhao commentedMaierWerx - have you made this change: http://drupal.org/node/569596
Comment #71
MaierWerx CreditAttribution: MaierWerx commentedZeezhao - Thanks for the response. I have made that change, which gets me past the white screen... but once I hit "Next" on Step 7 (Preview Page) I get sent back to the start page. I see that #35 (Parul) has this same problem, but I don't see it addressed anywere. I had this problem once before and got past it only to have other things break. I wish I knew PHP better... I'd really like to get this working...
Comment #72
holsworth CreditAttribution: holsworth commentedsubscribing.
I get an error message "SKU field is required." but there is no map for the sku field.
"I've been trying to get node_import to work with Ubercart 2 for some time now, and I can't seem to come up with the right combination of files/fixes/patches/versions. I will appreciate any assistance anyone can provide. I've read through all the posts, tried the various fixes/patches/versions etc... alas, I still cannot import Ubercart products."
same here.
Comment #73
bearstar CreditAttribution: bearstar commentedSubscribing
Comment #74
MaierWerx CreditAttribution: MaierWerx commentedFYI -
For anyone having a problem similar to my own, I figured out that node_import doesn't like IE for some reason... I tried using Firefox and everything works fine. Just thought I'd pass that along...
Comment #75
pcorbett CreditAttribution: pcorbett commentedI have not attempted to actually import anything, but I did receive this error when trying to use this module to import other content types:
I adjusted this function call per directions provided on the ubercart support site http://www.ubercart.org/forum/bug_reports/12843/csv_import_step_3. Basically, just delete the word "node" from the function call, so:
This allows node_import to get past screen/step 3.
Comment #76
Alun CreditAttribution: Alun commentedI had the same problem people have been mentioning, with the node_import skipping straight from step 3 back to step one with no mention of any problem (post 35)
Turns out I was being a complete plonker and trying to import an XML file instead of a CSV file! So if you are having this problem, check that your CSV file is correctly formatted. Though I don't think that many people will make the same mistake as me!
I also implemented jorks fix (post 36) though, my code was slightly different. Instead of
$fieldvalues = strlen($value) > 0 ? $fieldvalues = array(array_pop(array_map('trim', explode($hseparator, $value)))) : $fieldvalues = array($value);
I ended up with
$fieldvalues = strlen($value) > 0 ? $fieldvalues = array(array_pop(array_map('trim', explode($hseparator, $value)))) : $fieldvalues = array($value);
Finally, to sort out the stock value in the import, I used the following node-import fix
http://www.ubercart.org/contrib/11013
Which will allow me to add stock levels in the import too.
I had to alter two lines of the code in this file however, uc_stock.inc calls the depreciated funtion uc_product_node_is_product() twice so just find replace to uc_product_is_product(). You will find the lines you need to change on line 34 and line 101.
edit: Also on line 69.
I am currently importing my products - accidentally imported a whole file instead of a sample, but as it turns out, its currently on record 16485 out of about 40000 and its not been a problem so far!!
Comment #77
MadOverlord CreditAttribution: MadOverlord commentedI too cannot import ubercart stuff. I've added a bunch of fields to my product content type (which is called "product", not "uc_product", if that makes any difference), and I can assign the field items to any of them, but no ubercart fields appear, and then later I'm told the required SKU field wasn't configured.
I have 500 products to dump in, so... (grin)
Comment #78
rhl6856 CreditAttribution: rhl6856 commentedsuscribing, is there any work arounds available for the following setup:
Drupal 6.14
Ubercart 6.x-2.0
Node import 6.x-1.0-rc4
I vitally need to import products.
Comment #79
rhl6856 CreditAttribution: rhl6856 commentedsuscribing, is there any work arounds available for the following setup:
Drupal 6.14
Ubercart 6.x-2.0
Node import 6.x-1.0-rc4
I vitally need to import products.
I also have the same error trying to import a CSV file.
Comment #80
rhl6856 CreditAttribution: rhl6856 commentedsuscribing, is there any work arounds available for the following setup:
Drupal 6.14
Ubercart 6.x-2.0
Node import 6.x-1.0-rc4
I vitally need to import products.
I also have the same error trying to import a CSV file.
(sorry about the triple post, now I can't figure out how to delete!)
Comment #81
hassansr CreditAttribution: hassansr commentedcan some one please provide step by step instructions as how to importing products into dp 6 uc 2 is accomplished. I have set up about 10 items manually and have 100 to go.
if the input file is a csv file or a xml file do we figure out what the header fields are and the layout?
included in the csv file is the product image name
what do I do? the export function does not work so I can't see the layout
Comment #82
Zalatar CreditAttribution: Zalatar commentedAttached is a file that I have uploaded. Try it the way it is and then look at the page it creates. I struggled with it for a long time also. Remove the ".txt" at the end of the file name.
You will have to ensure you have an image in your directory or remove the file name in the "Image" field.
Hope this helps,
Z
Updated: If you have changed your node-product.tpl.php, located in your themes folder, you will need to change it back to the original. Not sure why, but that is what I had to do.
Also, if you are using uc_discounts_alt module, you will need to turn it off during the import. Again, not sure why but that is what I had to do.
Comment #83
zeezhao CreditAttribution: zeezhao commented#Zalatar - I was able to import your file successfully. I omitted the image column since I do not have you image. Also in "step 5 of 8" I blanked out the separators....
In any case, for the benefit of everyone pending a new release of node_import, attached is a fully patched node_import for ubercart that works in D6 and UC2... Patches were obtained from the node_import forum. It contains a few patches like the update patch (hardwired to use model number from uc_products), etc. The only patch not applied is the stock/attributes patch as it had a conflict with the update one I am using.
Comment #84
Zalatar CreditAttribution: Zalatar commentedGlad to hear it is working.
Z
Comment #85
razorback CreditAttribution: razorback commentedHi all -
I need to import products into my undercart and I ran across this thread. So I downloaded the node_import-patched-by-zeezhao.tgz attached in the previous post and i am unable to extract it. Any thoughts? Thanks!!
Comment #86
razorback CreditAttribution: razorback commentedok, i went and downloaded the latest dev version and have everything setup. I attempted to run the test file that is referenced in the advanced help (bird-houses) and it craps out on step 7 with this:
warning: Parameter 2 to drupal_retrieve_form() expected to be a reference, value given in C:\xampp\htdocs\drupal\modules\node_import\node_import.inc on line 1842.
Any help would be greatly appreciated!! I need this working asap PLEASE! What am i doing wrong? I'm new to drupal..... but learning a lot!
THANKS!!
Comment #87
Alun CreditAttribution: Alun commentedRazorback,
I did a quick search for you, and this issue seems like the same problem
http://drupal.org/node/635788
Give that a go. What version of PHP are you running? I'm not an expert, but the problem on that issue page looks like a PHP 4 error. PHP 5 doesn't do passing by reference, so changing that code would have no effect.
Comment #88
razorback CreditAttribution: razorback commentedAlzum,
Thanks dude!!!! That did it! I really appreciate the help. I did a search for the issue but apparently overlooked that obvious fix. Rock on! :-)
Comment #89
jeremylichtman CreditAttribution: jeremylichtman commentedWe recently hacked together a PHP script to do a database to database conversion from an old custom-built shopping cart into Ubercart.
I did a short tutorial on our blog, including a downloadable copy of our script here: http://lichtman.ca/learning/moving-data-to-drupal-ubercart
The tutorial covers the list of database tables that may be effected in different scenarios (i.e. custom fields for a product, product images etc).
Hope somebody finds this useful.
Comment #90
jbova CreditAttribution: jbova commentedI have installed this patched version of node_import. What needs to be done while creating a new import to use the update method?
I thought that if I chose no field for "The selected field will be used to find existing objects to update", it would default to the model, which is the SKU. This doesn't appear to be the case as I am getting duplicates instead of updates.
Thank you.
Comment #91
Alun CreditAttribution: Alun commentedjbova, you may be interested to read the following thread - I have uploaded my custom module that uses the SKU to match product and update them.
http://drupal.org/node/422282
Comment #92
jbova CreditAttribution: jbova commentedAlun,
Thanks. I'll give that a try. I mistakenly thought that was included in the patch above by zeezhao.
Comment #93
HongPong CreditAttribution: HongPong commentedsubscribing - nifty stuff
Comment #94
fender-dupe CreditAttribution: fender-dupe commentedso you are saying this works, because I am just trying to import large number of products
can you import meta desc and meta keywords too?
Comment #95
Militopedia CreditAttribution: Militopedia commentedHello,
I just tried node-import for the first time for the creation of ubercart products and it worked just perfectly. However, one very important feature appears to be missing:
I think I am not the only one who needs importing different images for different product options.
Is somebody working on integrating option_images into node_import at the moment (I would support its development with a donation; unfortunately I can't help with any professional programming skills other than basic php, html skills)?
Is there another possibility to upload and assign option images for products that were imported with node_import?
Thanks!
Roger
Comment #96
fender-dupe CreditAttribution: fender-dupe commentedIs there a way you can export the existing product pages so you can see how the excel is structured?
How you name the excel columns? that is my question. It would be much easier to see the excel of current products you have on the site.
I also have video cck embed field and image cck field, can I import those too?
Can somebody send me an excel sample of few products so I can see how this baby works?
thank you
Comment #97
Alun CreditAttribution: Alun commentedfender,
It does not matter what the columns are called when you import - you select them during the import steps, so as long as you know what they are called, node_import doesn't care. It can import CSV files without any field headings. Your image imports might well work, but I doubt the video field will work.
I don't have any files to hand to help you, but all you need is one product per line in your excel file.
Comment #98
fender-dupe CreditAttribution: fender-dupe commentedgood, this is awesome
thank you so much, i thought you have to name the columns with specific names or the import won't work.
Comment #99
cjdavis CreditAttribution: cjdavis commentedA couple of notes:
- You can name the columns anything you like in any order, but if they each have the exact same name as a field in the content type, node_import will automatically match them up by default. That can save a lot of time if you have many fields.
- You can set up a csv export of your products (or any other content type) using the views bonus pack - http://drupal.org/project/views_bonus - that too can save you some time figuring out just what is expected.
Comment #100
fender-dupe CreditAttribution: fender-dupe commentedOk, I have finished my first import.
not happy
Here are the 2 errors I got.
* warning: mb_strlen() expects parameter 1 to be string, array given in /home3/altermed/public_html/thaistore/includes/unicode.inc on line 404.
* warning: mb_strlen() expects parameter 1 to be string, array given in /home3/altermed/public_html/thaistore/includes/unicode.inc on line 404.
Here are my fields.
Title Description Catalog Weight Weight unit Length Width Height Dimensions unit SKU image image2 list price cost sell price
The problem is that the catalog category was not imported, and also the length, width and height were not imported instead I got this in the dimension field
Dimensions: 0 in × 0 in × 0 in
I out numbers in each field but get 0
Can somebody help clarify?
Comment #101
Alun CreditAttribution: Alun commentedfender, what version of node_import are you using? rc4 or the latest dev snapshot?
If you are using rc4, try thew dev snapshot. It is fairly stable and fixes a lot of issues.
Also try searching for your error message, i found a few threads after searching related to this, you might find the issue has been solved..
http://drupal.org/node/383926
http://www.ubercart.org/issue/11196/attributes
Comment #102
fender-dupe CreditAttribution: fender-dupe commentedYes I updated the version to latest dev, the category is fixed but the dimensions still show
Dimensions: 0 in × 0 in × 0 in
I can not import till this issue is fixed, everything else works superbly
Any idea
Comment #103
Alun CreditAttribution: Alun commentedhere you go, there is a patch on this thread
http://drupal.org/node/688426
Comment #104
fender-dupe CreditAttribution: fender-dupe commentedI tried to patch it from this tut
http://www.indiawebsearch.com/content/how-to-apply-a-patch-to-a-drupal-m...
Could not do it, I am attaching the screenshot
What is the easiest way to patch it, can i find an really easy tut for newbies?
Or can somebody send me the patched zip to my email fenderguitar[at]gmail.com
thank you so much
Comment #105
fender-dupe CreditAttribution: fender-dupe commentedComment #106
Alun CreditAttribution: Alun commentedI don't know why it didn't work, I usually just do patches manually. remove the lines where the file indicates - and add the lines indicated by a +.
You can do them automatically if you get to grips with Eclipse, but its a small patch, just do it manually. I would do it, but I'm not around my main computer at the moment, sorry.
Comment #107
fender-dupe CreditAttribution: fender-dupe commentedok I patch it manually, worked like a charm. thank you people. Drupal rocks!!!!
Comment #108
babbage CreditAttribution: babbage commented@Alun: Wow. You should really look at patching automatically. Life is waay easier when you get the patch -p0 < patchname.patch figured out...
Comment #109
Alun CreditAttribution: Alun commented@dbabbage: I know its the simplest of things to do, but I can be so lazy, the time it takes to do it manually is quicker than learning to do it automatically, and I only have to do it occasionally, so I have never bothered!! That said, I have recently started using Eclipse, and it does have a 'apply patch' feature when I right click on a file, so I might use that next time.
Comment #110
babbage CreditAttribution: babbage commented@Alun. LOL. The entire tutorial is in my comment above... Applies all fragments of the patch across multiple files, when run from the root directory of the module. But each to their own... whatever workflow works is just fine by me. :)
Comment #111
Phoenixxx CreditAttribution: Phoenixxx commentedI am getting the following error:
warning: mb_strlen() expects parameter 1 to be string, array given in /includes/unicode.inc on line 404
Fender, it looks like you fixed your category problem on #102. May I ask what you did to solve that particular error? I am trying to import the categories based on the catalog, same as you, I think, for instance: Clothing >> Mens but am having no luck, and can't find an answer anywhere else.
Tags are off, but when I turn them on, everything imports fine, but the term imports as a singular term - 'clothing >> mens' as opposed to being two separate terms in a heirarchy, for instance, 'clothing' >> 'mens'. If I'm not mistaken, it should be the latter, correct?
I am currently using node import 6.x-1.x-dev, ubercart 6.x-2.x-dev, and Drupal 6.15
Thanks!
Comment #112
Alun CreditAttribution: Alun commentedPhoenixxx: have you seen this thread: #434572: Add support for content_taxonomy
It seems to be on the topic you are talking about. There is a recent patch at the bottom of it.
Comment #113
zeezhao CreditAttribution: zeezhao commentedIt may be better if someone posts the "latest fully patched & complete" node_import , just like I did here:
http://drupal.org/node/349408#comment-2260858
That way, its easier for anyone who needs.
Fyi - I also noticed that the dev version was updated on 2010-Feb-06 - see: http://drupal.org/project/node_import
So not sure what patches have now made it in...
Comment #114
fender-dupe CreditAttribution: fender-dupe commentedI have latest versions of node import, before upgrade I could not imprt categories
but I dont have 2 level deep categories like you are having, only 1 level
Comment #115
Phoenixxx CreditAttribution: Phoenixxx commentedAlun and Zeezhao,
Thanks for the tips! It appears that the import now works after both your leads: #434572: Add support for content_taxonomy and the latest dev version of node import.
Fender,
To confirm, I am finding that two-deep hierarchies ARE working, if you ever need to use that. The only caveat I found here is that all the terms need to be created in advance in order for the import to go through - though this is probably because I am not using free tagging.
Thanks again guys, you rock!
Comment #116
fender-dupe CreditAttribution: fender-dupe commentedOk good if it is working for you
I have only the problem in catalog view where my images are missing, and can't fix this.
Why you can't set up the catalog images (mysite.com/catalog1......) with views or cck, and select which image you want to use from iamge cache presets. I am bumming myself out with this for so long already.
Comment #117
Militopedia CreditAttribution: Militopedia commentedHas anybody tried yet if the new development version supports uc_option_images?
Comment #118
Summit CreditAttribution: Summit commentedSubscribing, greetings, Martijn
Comment #119
prakash123 CreditAttribution: prakash123 commentedhi everybody,
I am new to drupal. I want to import data from existing database. I installed the node importer, i am using ubercart. I loaded the csv file, selected type product but i dont find the price, sku fields while mapping the fields. can anyone help me , i searched through but didn't find a solution, facing problem since last 3 days.
Comment #120
fender-dupe CreditAttribution: fender-dupe commentedcheck if you have all the permissions nabled, also all modules installed and have latest versions of plugins, it worked for me, also I think you need to patch it for importing categories
Comment #121
dom_b CreditAttribution: dom_b commentedis there a patched uc_product.inc that allows you to import features/downloads to products as well? I desperately need one! I can't work out how to add it myself...
Comment #122
dom_b CreditAttribution: dom_b commentedIs there no way of importing downloads using node_import? this would be incredibly useful...
Comment #123
dreadfulcode CreditAttribution: dreadfulcode commentedI just got my first
Call to undefined function uc_product_node_is_product() ....blah/blah
today while attempting to import new products into Ubercart.
Are there any nice cut/paste solutions out there? Any solutions?
Comment #124
dreadfulcode CreditAttribution: dreadfulcode commentedaha! Found it!
Change the function uc_product_node_is_product TO uc_product_is_product
in line 15 of
uc_product.inc
which is found in
\sites\all\modules\node_import\supported\ubercart
*sigh*
Comment #125
dreadfulcode CreditAttribution: dreadfulcode commentedSo now, a few screens later, I get
warning: Cannot use a scalar value as an array....
Everything is mapped out, but it's not converting into a node.
I am not trying to import pics or taxo terms, just sku #, title, description, cost, and sell price.
What is this?
Comment #126
mmsman CreditAttribution: mmsman commentedI am running
Drupal 6.14
Ubercart 6.x-2.0
Node import 6.x-1.0-rc4
I am trying to do a CSV upload for products, however, when I get to step 7 and preview the items and click next it goes back to step 1 and I lose everything. Someone please tell me what's going on here. Also, since i've uploaded the node import module and date module when I get to pages like node_import/add the page looks funny like its not seeing the CSS correctly, my "layout (background) disappears..... any reason?
Comment #127
webengr CreditAttribution: webengr commentedsubscribe
Comment #128
mmsman CreditAttribution: mmsman commentedI know i'm gonna sound stupid, but i'm new here. Subscribe to.......?
Comment #129
xurizaemon@mmsman: Not a stupid question at all! Drupal.org has long lacked a decent method for people to flag a topic as something they wish to follow without sending issue notifications to all other watchers of that topic. Probably the only "stupid" part is how long (nearly five years?) our community and infrastructure have tolerated the situation. See 3281d's Death to Subscribe Comments and Improving Subscriptions for one attempt to resolve the problem. The latter link there has a number of pointers to other Drupal.org issues which are related.
Welcome to Drupal.org!
Comment #130
11Cars CreditAttribution: 11Cars commentedsubscribe
Comment #131
11Cars CreditAttribution: 11Cars commentedNode_Import Works in May 2010!
After MANY failed attempts I got node_import to successfully import 6,100 products and connect to the underlying images.
I experienced every type of error you can find in these forums, including White Screen of Death which is the most frustrating. I searched for alternatives to node_import and could not find one. Since I cant write my own scripts (I don't know php), I needed to make this work.
If you follow this "In Order" it will work.
I am running Drupal 6.16, MySQL 5.1.4.1, Php 5.3.1 with php Memory at 128
My preferred way to duplicate this success would be as follows:
1. Download the Install Profile "UberDrupal" (6x-1x-Alpha6). Run Status report and update modules.
2. Add Modules "Date" (enable Date API only), "Advanced Help" & "Node_Import" version 6x-1.0-RC4 from http://drupal.org/project/modules (The more recent node_import Dev files did not work for me)
3. Enable Modules and run update.php
4. Download & Install "Node Import Patched by Zeevo" in post #83 of Node 349408. Run update.php. (DO NOT SKIP STEP 2)
5. Add "&" to "$args" on line 1842 of the node_import.inc file. See http://drupal.org/node/635788 for details on this
6. Edit your Vocabularies to allow "Tags" and turn off "Required" & "Multi-Select" options
7. Build your CSV file with Open Office to you can use UTF-8 characters (Excel does not work)
8. Upload your desired images to /sites/default/files
9. Run node_import, work the errors out of the first 5 records and go. Note that I leave several required fields out of the csv file and rely on the default option screen. In particular, I use this for the "Published Date" field as I find getting the date format right in Open Office to be tricky.
I have attached an example CSV file for my product set. Yours will be different. For example the columns "Make / Model Search", "Make", "Model Year" and "Shot" all refer to specific vocabularies in my particular application. That said, when I was beginning this effort, I wanted to view an example and could not find one. (The upload is excel since csv files are not an allowed upload in this forum)
I hope this helps some newbie save some time. I find this community to be awesome and just want to give back in some small way.
Comment #132
emanuel.nedelcu CreditAttribution: emanuel.nedelcu commenteddid you solve this problem? I just started to use Drupal and I need to do the same thing that you were asking above, import download feature. If you have any idea how I can do this pls let me know... Thx
Comment #133
dziemecki CreditAttribution: dziemecki commentedI want to thank 11Cars for his very detailed instructions. Unfortunately, I got the WSOD (White Screen of Death) on step three of the import wizard, and then decided I needed to handle this a different way. Let me throw this out to anyone getting frustrated by a WSOD - add error display code to the index.php file:
http://drupal.org/node/158043
Just this one little modification to your development environment will make tweaking 4th party patches to no-longer-maintained 3rd party modules a comparable joy.
Comment #134
j0rd CreditAttribution: j0rd commented@dziemecki: white screen of death errors if they are not caused by code (turn on error_reporting and check your error logs) are usually caused by:
1. PHP not having enough memory_limit. Turn it up.
2. PHP not having enough execution time.
3. PHP not having enough "max post/file size" for uploads.
It's probably related to #1 though, the other I posted for verbosity. Turn it up to at least 96M. If that doesn't work, temporarily jack it up to like 256M. Also make sure you have enough execution time (at least as long as it'll take for your import to fully run, although I think the Drupal batch processing this uses avoids that).
@j0rd: Personally what I'm looking for is an attribute and options patch. Along with the code I've found in here, I've also found this thread. http://www.ubercart.org/project/node_import_uc_stock . Checking out all the code now and will post results when done.
I may end up writing a custom (in code) importer, as it will be more flexible. I'm either going to have to write code to create my CSV or code to create my import. I think the later will be more worth wild...so may go that route.
Comment #135
jefflane CreditAttribution: jefflane commentedHere is a fix that worked for me:
1) Open sites/all/modules/node_import/supported/ubercart/uc_product.inc
2) Change all instances of 'uc_product_node_is_product' to 'uc_product_is_product'
3) Save the file
4) Make sure you have php_ini("memory_set", "96M"); in your settings.php (located in sites/default/settings.php). 96M is what I needed, you can adjust as necessary.
And that worked.
Comment #136
razorback CreditAttribution: razorback commentedI have been using node import for several month now for improting large numbers of products with variants (ie shirts that come in multiple color/size combinations). When I upload these products everything look fine - optionsa are added correctly, adjustments tab looks correct and stock tab is correct (contains a "parent Sku" p101 - active unchecked and all related children skus - active checked and distincted item nubers "101,102,103,104") but when our customers checkout online the invoice is receiving the parent sku no matter which child sku is selected. I beleive this is caused by node_import because I can manually create a product with same configurations and everything works correct. The child sku is passed to the invoice screen and not the parent.
I figured out a "workaround" for now.... it is almost as strange as the issue. After the product is created I can go into the adjustments tab and click save (no other changes) and then the correct item numbers are passed the invoice at checkout.
Has anyone seen this before?
Comment #137
razorback CreditAttribution: razorback commentedAnyone have any thoughts on my question at #136? This may not be the right place for this question but this is the thread where I got the fixes and things I needed to make the tool work so I thought this was the best place to start. If I need to enter this somewhere else just let me know. Thanks!
Comment #138
j0rd CreditAttribution: j0rd commentedI've extended node_import or more specifically cpILL's node_import ubercart extensions to add support for "Ubercart File Downloads".
http://www.ubercart.org/project/node_import_uc_stock#comment-55048
--
Ubercart module development
Comment #139
ar-jan CreditAttribution: ar-jan commentedI got the white screen of death when hitting 'Next' on step 3 (Set file options). I wanted to import to another product class than the default 'Product', in to another content type that is. I didn't find this documented yet, so here it is:
- Copy /sites/all/modules/node_import/supported/ubercart/uc_product.inc to uc_mycontenttype.inc
- Like in #135, remove the 'node_' part from 'uc_product_node_is_product' in uc_mycontenttype.inc
- Also change 'uc_product' to 'uc_mycontenttype' so it looks like 'uc_mycontenttype_is_product'
Now import works fine for other content types / product classes!
I had Excel installed, so I exported to CSV and then edited the export with Notepad++ to convert to 'UTF-8 without BOM'. Since there are no double quote text delimiters in Excel exports, I replaced all semicolon separators in tabs, which is also supported.
Comment #140
zkrebs CreditAttribution: zkrebs commentedIn regards to #137
I would have phpmyadmin open and look at your database tables ( uc_product_* tables), before and after you make the change. See what has changed, perhaps you could issue a SQL UPDATE command to fix the issue, i.e. activate all your product attributes/options. Sounds like a value stored in the DB is updated when you hit save.
Comment #141
deggertsen CreditAttribution: deggertsen commentedUsing the package from #138 I just tried doing a massive import of 938 products. However on the majority of the products I got this error: "An illegal choice has been detected. Please contact the site administrator." I've been looking over the reports for awhile and I can't figure out what could be causing this... Would anybody mind taking a look? I've attached the downloaded rows with extra columns (only the first 200, it was too big without cutting out a bunch of rows) and the Node import debug report. Any help would be great!
Thanks
Comment #142
xl_cheese CreditAttribution: xl_cheese commentedYou'll have to peel the banana. Try importing one of the failing products. Then remove the fields one at a time until you get a sucessful import. This should help you target what is exactly causing the problem.
Comment #143
j0rd CreditAttribution: j0rd commented**
* @mainpage Public API of Node import
*
* Global variable: $node_import_can_continue
*
* Boolean. Some imports may not be able to do more then one row at a
* time because of all kinds of (static) caching in Drupal. For example
* if you import a node with taxonomy terms and select to create the
* non-existing terms on import, taxonomy_get_tree() will not have an
* up-to-date internal list of terms and so the submission of the form
* will fail due to "An illegal choice has been detected. Please contact
* the site administrator.".
Just did a search on the code and that's what came up.
I know you run into this problem when your CSV file has values for data that node import isn't expecting. So say you have "Hello" in a field that requires 1 or 0. You will probably get an error like this.
I would assume this is your problem and not the module (although it could probably provide better error reporting)
Comment #144
doof2010 CreditAttribution: doof2010 commentedComment #145
jim0203 CreditAttribution: jim0203 commentedsubscribing - would anyone like a patch to change line 15 of uc_product.inc as per #124 and #135?
Comment #146
Anonymous (not verified) CreditAttribution: Anonymous commentedHi. I was not able to open the node_import-patched-by-zeezhao.tgz file as well. It seems that you found the way to do that Zalatar, in post #84, but I can't really tell by that post. What am I missing?
SOLVED - well that was strange. Had to save the file first, then decompress instead of decompressing directly at the time of downloading. Never had to do it that way before.
Comment #147
espirates CreditAttribution: espirates commentedI got this error "Fatal error: Call to undefined function uc_product_node_is_product() " trying to import 1 node (content type page), now what does ubercart product have to do with page content ? (scratching head)
Comment #148
Alun CreditAttribution: Alun commented@espirates This is an old error which needs updating in the repository, change uc_product_node_is_product() to uc_product_is_product().
Comment #149
Dimm CreditAttribution: Dimm commented+1
Comment #150
Typeface CreditAttribution: Typeface commentedHi
I have made a products.csv and have imported the products and all went fine the one issue i have is none of the products have gone into there respective categories, i followed the instructions on this website
http://tomandcrystal.com/creating_products_in_ubercart
and on that site it says
"If you are creating products with several categories that are in a hierarchy structure, you must first manually create the taxonomy terms, then adjust your vocabulary setting so that "Tags" are unselected, "Multiple select" is selected, and "Required" is unselected. Then in the "Products" column of you .csv file, use the names of your final end category. For example, if your taxonomy hierarchy looks like "Beverages > Soda > Coca Cola > Ramblin' Root Beer", then the only thing you would type in the column for a product to go under the category of "Ramblin' Root Beer"
OK so i have followed that info to the letter and basically all my products are in no catagory, everything else imports fine so im wondering if i have somehting slightly out of wack regarding the "Products" column name? Could it have been changed in updates or something simple?
I have attached a sample of my csv as a txt file, any ideas would be really appreciated, i know i can do each section individually and choose the catalog catagory each time but with 3000 products in 90 catagorys i wanted to at least try getting it working with one csv file.
cheers
Comment #151
ar-jan CreditAttribution: ar-jan commentedTypeface, try the -dev release, this fixed some problems I had. Also see http://drupal.org/node/437834#comment-1766940 etc.
Comment #152
itserich CreditAttribution: itserich commentedI am getting this error even though I am not trying to import a product, just regular nodes:
Fatal error: Call to undefined function uc_product_node_is_product() in /home/hl90mnvk/public_html/sites/all/modules/node_import/supported/ubercart/uc_product.inc on line 15
#124 worked. Thanks.
Comment #153
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented#124 did the trick.
Comment #154
maaak CreditAttribution: maaak commentedComment #155
maaak CreditAttribution: maaak commentedComment #156
maaak CreditAttribution: maaak commentedHi all,after much head scratching i have eventually got to step 6.......wahoo he cried only to be faced with that dreaded white screen and the following log error
mb_strlen() expects parameter 1 to be string, array given in /var/www/vhosts/setsmart.co.za/httpdocs/includes/unicode.inc on line 410.
i am attaching a .xls copy of my .csv
any help would be most appreciated,
yours in confusion\
i am running d6-9,and u-2
thankyou for helping!!
p.s followed #124 and thus got to step 6
.m
Comment #157
EvanDonovan CreditAttribution: EvanDonovan commented@maaak: Please don't change issue titles to something specific to yourself. It loses track of the overall discussion.
@all: As someone just coming into this discussion, at a client's request, seems like this issue could do with a summary. What has been committed to the module in regard to Ubercart support, and what remains to be added?
j0rd, has your work been offered to the maintainer as a patch, or is it simply the custom version of the module offered in #138? Is your work only necessary to support file downloads, or other types of import as well?
Should a patch be rolled for the fix in #124, or has that already been committed to this module?
Finally, is there any documentation of the correct process for importing product nodes from a CSV file newer than http://www.ubercart.org/docs/user/11089/import_products_csv_format, which is for 5.x?
I'll try to answer some of these questions myself, in the hopes of getting this discussion back on track, but anyone who's worked in this area previously is welcome to respond first if they know.
Comment #158
EvanDonovan CreditAttribution: EvanDonovan commentedLooks like #1026868: uc_product_node_is_product() undefined was committed, and #913406: Ubercart - Integrate Ubercart Fixes describes an issue that is caused by the same thing (change in API to use uc_product_is_product). Should this issue be closed?
Comment #159
Robrecht Jacques CreditAttribution: Robrecht Jacques commentedI'll get over this issue and #913406: Ubercart - Integrate Ubercart Fixes to see what parts of this still needs to be committed.
The mb_strlen() problems are not specific to Ubercart, but rather to taxonomy.
Comment #160
EvanDonovan CreditAttribution: EvanDonovan commentedYea, I didn't think that mb_strlen should be in here. I saw you made that a separate issue.
Comment #161
EvanDonovan CreditAttribution: EvanDonovan commentedI just tested the Ubercart import on the 6.x-1.x-dev, and the import worked perfectly, including a few CCK fields. I did not test the taxonomy issue (which I agree is out of scope for this issue), nor the import of the following Ubercart fields, though:
However, I would suspect that these fields would work the same as the ones that I did test.
I think that comment #138 is the main thing that still could be added to the core node_import package, now that #1026868: uc_product_node_is_product() undefined is resolved.
I wrote up some documentation on how to do an import of Ubercart products, plus created a sample CSV file. Where do you think would be the best place for that? I suppose the Ubercart docs site would be one, but I don't seem to have access to edit that.
Comment #162
EvanDonovan CreditAttribution: EvanDonovan commented@maaak: For your mb_strlen issue, it looks like the place you should be commenting is actually #383926: mb_strlen() errors on taxonomy imports.
Comment #163
Robrecht Jacques CreditAttribution: Robrecht Jacques commented@EvanDonovan - docs on Ubercart / Node import would be welcomed. If you could write them in Advanced help format (basically HTML), it can be added to Node import and probably the handbook. Could you open a new issue with docs + sample csv attached? We can discuss there what the best place would be.
Comment #164
EvanDonovan CreditAttribution: EvanDonovan commented@Robrecht: Are there already docs on how to do a Node Import generally, though? My concern would be that it would duplicate the basic instructions for the most part.
Comment #165
EvanDonovan CreditAttribution: EvanDonovan commentedDocs issue is here: #1141202: Document how to import Ubercart products (in 6.x).