node_import & ubercart 2

Gumk - December 20, 2008 - 09:05
Project:Node import
Version:6.x-1.0-rc4
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:content taxonomy node import
Description

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.

#1

doughold - February 3, 2009 - 21:45

I 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.

#2

Robrecht Jacques - February 10, 2009 - 10:10
Version:6.x-1.0-rc2» 6.x-1.0-rc3
Status:active» postponed (maintainer needs more info)

What exactly do you wish to import? uc_product? Can you attach a sample CSV file (10 rows or so) to easy testing? Thanks.

#3

Gumk - February 10, 2009 - 22:12

Here, 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.

AttachmentSize
primery.zip 25.28 KB

#4

warrenscott - February 13, 2009 - 15:45
Version:6.x-1.0-rc3» 6.x-1.x-dev

Here is the file I have been trying. Can get to mapping fine but the proper mapping fields are not available

AttachmentSize
node_import_1.zip 1.94 KB

#5

doughold - February 17, 2009 - 02:36

I 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.

AttachmentSize
uc_product.zip 3.54 KB

#6

snepa - February 17, 2009 - 05:42

doughold,

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

#7

snepa - February 17, 2009 - 06:59

doughold,

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

#8

ferrangil - February 19, 2009 - 11:24

Subscribing... very interested in node_import for ubercart 2 and drupal 6.x

#9

doughold - February 19, 2009 - 15:52

Hey, sorry for not posting this earlier, I am using the rc3 version, Drupal 6.9, and UC Beta 4

#10

BeatnikDude - February 20, 2009 - 03:14

Thanks 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.

#11

drdmmr - February 22, 2009 - 04:14

I 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.

#12

lbrown - February 22, 2009 - 21:08

Subscribing.

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

#13

drdmmr - February 23, 2009 - 23:56
Title:node import and ubercart 2» success using PHP, node_import & ubercart 2
Component:User interface» Code

I 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

#14

drdmmr - February 24, 2009 - 09:20
Title:success using PHP, node_import & ubercart 2» node_import & ubercart 2
Component:Code» User interface

Using 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.

#15

hutch - February 24, 2009 - 09:56

Subscribed: a very interesting development, I would like to see your code so far, I might be able to chip in here ;-)

#16

doughold - February 24, 2009 - 22:05

FYI: 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.

#17

cjdavis - February 25, 2009 - 16:31

subscribing. We have a huge need for node_import with UC2, it sounds as if we should be testing the latest dev release.

#18

Robrecht Jacques - February 25, 2009 - 21:19
Status:postponed (maintainer needs more info)» fixed

Ubercart 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

#19

cjdavis - February 26, 2009 - 03:52

That 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!

#20

hutch - February 26, 2009 - 10:24

I 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

$row = db_fetch_array(db_query("SELECT nid, count(model) AS ct FROM {uc_products} WHERE model = '%s'", array($node->model)));
if ( $row['ct'] > 0 ) {
  // skip or better still UPDATE on $row['nid']
}

Any ideas welcome

#21

Robrecht Jacques - February 26, 2009 - 11:12

I 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.

#22

hutch - February 26, 2009 - 11:46

I understand the need to get importing functioning first, I will knock up a bootstrap script for my needs in the meantime.

#23

ferrangil - February 26, 2009 - 11:51

Yes, 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.

#24

doughold - February 26, 2009 - 16:38

Updating 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!

#25

zeezhao - February 27, 2009 - 07:38

Hi. 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

#26

zeezhao - February 27, 2009 - 08:18

I 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)

#27

ferrangil - February 27, 2009 - 08:54

I 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.

#28

zeezhao - February 27, 2009 - 12:06

It 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...

#29

zeezhao - February 27, 2009 - 12:44

Please 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.

#30

drdmmr - February 27, 2009 - 21:05

I 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

#31

JackThompson - March 3, 2009 - 19:39

Any progress on this? Will this work for digital goods? if so, how to tell Uber about the location of the digital goods?

#32

mynode - March 15, 2009 - 23:04

Are 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.

/*
* Added by mynode to allow products to be updated
* with bulk import.
* The function matches the imported node's 'SKU' with the 'model' field
* stored for the uc_product.
*/
function uc_product_nodeapi(&$node, $op, $teaser, $page) {
  if($op=='presave' && isset($node->log)
     && $node->log == 'Imported with node_import.' && isset($node->model)) {
    $result = db_query("SELECT nid, vid, model FROM uc_products where model='".$node->model."' ORDER BY vid DESC LIMIT 1");
    if($prod = db_fetch_object($result)) {
      $node->nid = $prod->nid;
      $node->vid = $prod->vid;
    }
  }
}

#33

asoka250 - March 24, 2009 - 19:34

Is 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.

#34

xurizaemon - March 25, 2009 - 11:06

@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:

<?php
      $sql
= "SELECT nid, vid, model FROM {uc_products} where model='%s' ORDER BY vid DESC LIMIT 1" ;
     
$result = db_query($sql, $node->model);

?>

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.

#35

parul - March 27, 2009 - 05:31
Version:6.x-1.x-dev» 6.x-1.0-rc4
Category:feature request» bug report
Status:fixed» needs work

I 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)

#36

jork - March 31, 2009 - 20:09

I 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.

#37

kilrizzy - April 20, 2009 - 19:59

@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?

#38

quadmin - April 28, 2009 - 14:01

Errors
SKU field is required.

Drupal version: 6.10
PHP version: 5.2.6
node_import 6.x-1.0-rc4

error file in attachment:

AttachmentSize
node_import-node_product-2.txt 35.75 KB

#39

jork - April 29, 2009 - 18:16

@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.

#40

Prasad Shir - June 9, 2009 - 00:51

subscribing

#41

samhodge1972 - June 15, 2009 - 06:02

I 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

  1. Create a Vocablary called "Food", applied to the "Page" content type
  2. Add a Term "Fruit" to the vocab "Food"
  3. Add a Term "Veg" to the vocab "Veg"
  4. Open up the Node import dialog
  5. point it to the text file hosted at http://www.hodge.net.au/fruitnveg.txt
  6. This is a tab delimited file
  7. Link the "Title" to "Title"
  8. Link the "Content" to "Body"
  9. Link the vocab "Food" to "Type"
  10. Next, Next Next
  11. Error
  12. No taxonomy terms added to the content
AttachmentSize
fruitnveg.txt 851 bytes

#42

Zalatar - June 15, 2009 - 18:09

**subscribing**

#43

pancapangrawit - June 17, 2009 - 09:47

**subscribing** too :) Would be lovely to have this working!

#44

CKIDOW - June 17, 2009 - 11:59

subscribing

#45

domineaux - June 18, 2009 - 19:08

Subscribing

#46

junwin - June 19, 2009 - 07:11

Hi,

The following value is triggering the error in $values[$fieldname]:

array(1) {
  [0]=>
  array(1) {
    [0]=>
    string(10) "Value"
  }
}

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,

AttachmentSize
node_import-6.x-1.0-rc4.flatten_importvalues.patch 780 bytes

#47

JackThompson - June 19, 2009 - 14:02

What about importing Digital E-goods. Does anyone care???

#48

terryg - June 20, 2009 - 17:46

Subscribing

#49

dawick - July 13, 2009 - 19:23

For 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!

#50

zaphod4269 - July 28, 2009 - 17:10

Yes, 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...

#51

zaphod4269 - July 28, 2009 - 18:04

I'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.

#52

zaphod4269 - July 28, 2009 - 19:00
Version:6.x-1.0-rc4» 6.x-1.x-dev
Component:User interface» Code

I 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.

#53

domineaux - July 29, 2009 - 12:39

I 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

#54

cjdavis - August 5, 2009 - 18:35

The 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 -

Fatal error: Call to undefined function uc_product_node_is_product() in ....\node_import\supported\ubercart\uc_product.inc on line 15

Which is caused by the missing uc_product_node_is_product() function. Add the following to the uc_product.inc file:

<?php
/**
* Check if the node_import $type is a uc product content type.
*
* @param $type
*   String. Node_import $type.
*
* @return
*   FALSE if $type is not a node content type. Otherwise
*   the node content type.
*/
function uc_product_node_is_product($type) {
  if (
strpos($type, 'product') === 0) {
    return
TRUE;
  }
  return
FALSE;
}
?>

I've attached the entire file. Anybody good at generating a patch, feel free to contribute it..

AttachmentSize
uc_product.zip 972 bytes

#55

heyyo - August 18, 2009 - 12:50

same error than in #38
SKU field is required at step 7/8

with last Ubercart RC-4

#56

xurizaemon - August 18, 2009 - 12:57

@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

#57

heyyo - August 18, 2009 - 13:01

I 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")

#58

xurizaemon - August 20, 2009 - 21:53

@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).

<?php
/**
* Determines whether or not a node type is a product node type.
*
* @param $type
*   The node type to check.
* @return
*   TRUE or FALSE indicating whether or not a node type is a product node type.
*/

/* DON'T USE - see comment above for the replacement function
function uc_product_node_is_product($type) {
  drupal_set_message("DEPRECATED - Please remove the function uc_product_node_is_product() and use uc_product_is_product() instead.");
  return in_array($type, uc_product_types());
}
*/
?>

#59

heyyo - August 18, 2009 - 13:38

I 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.

#60

heyyo - August 18, 2009 - 14:03

With 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.

#61

xurizaemon - August 20, 2009 - 22:11

@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())

#62

schwascore - August 29, 2009 - 00:44

I'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!

#63

sicnic - September 2, 2009 - 17:02
Status:needs work» needs review

Changed 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

#64

sicnic - September 3, 2009 - 03:08
Status:needs review» needs work

#65

TechnoBuddhist - September 3, 2009 - 11:22

subscribing

#66

Jakowski - September 12, 2009 - 00:03

Sicnic, 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.

#67

sicnic - September 14, 2009 - 15:28

This works for me. I have to change the _uc_product_node_import_is_product when I am not importing products otherwise it fails.

<?php
// $Id:$

/**
* @file
* Support file for node_import module for Ubercart products (uc_product).
*/

/**
* Implementation of hook_node_import_fields().
*/
function uc_product_node_import_fields($type) {
  if (_uc_product_node_import_is_product($type)) {
$fields = array();
    $fields['model'] = array(
      'title' => t('Product: SKU'),
      'group' => t('Product information'),
      'weight' => 1,
    );
    $fields['list_price'] = array(
      'title' => t('Product: List price'),
      'group' => t('Product information'),
      'weight' => 2,
    );
    $fields['cost'] = array(
      'title' => t('Product: Cost'),
      'group' => t('Product information'),
      'weight' => 3,
    );
    $fields['sell_price'] = array(
      'title' => t('Product: Sell price'),
      'group' => t('Product information'),
      'weight' => 4,
    );
    $fields['shippable'] = array(
      'title' => t('Product: Shippable'),
      'group' => t('Product information'),
      'input_format' => 'boolean',
      'weight' => 5,
    );
    $fields['weight'] = array(
      'title' => t('Product: Weight'),
      'group' => t('Product information'),
      'weight' => 6,
    );
    $fields['weight_units'] = array(
      'title' => t('Product: Weight unit'),
      'group' => t('Product information'),
      'allowed_values' => array('lb' => t('Pounds'), 'kg' => t('Kilograms'), 'oz' => t('Ounces'), 'g' => t('Grams')),
      'default_value' => variable_get('uc_weight_unit', 'lb'),
      'weight' => 7,
    );
    $fields['length_units'] = array(
      'title' => t('Product: Dimensions unit'),
      'group' => t('Product information'),
      'allowed_values' => array('in' => t('Inches'), 'ft' => t('Feet'), 'cm' => t('Centimeters'), 'mm' => t('Millimeters')),
      'default_value' => variable_get('uc_length_unit', 'in'),
      'weight' => 8,
    );
    $fields['length'] = array(
      'title' => t('Product: Length'),
      'group' => t('Product information'),
      'weight' => 9,
    );
    $fields['width'] = array(
      'title' => t('Product: Width'),
      'group' => t('Product information'),
      'weight' => 10,
    );
    $fields['height'] = array(
      'title' => t('Product: Height'),
      'group' => t('Product information'),
      'weight' => 11,
    );
    $fields['pkg_qty'] = array(
      'title' => t('Product: Package quantity'),
      'group' => t('Product information'),
      'weight' => 12,
    );
    $fields['default_qty'] = array(
      'title' => t('Product: Default cart quantity'),
      'group' => t('Product information'),
      'default_value' => 1,
      'weight' => 13,
    );
    $fields['ordering'] = array(
      'title' => t('Product: List position'),
      'group' => t('Product information'),
      'input_type' => 'weight',
      'delta' => 25,
      'default_value' => 0,
      'weight' => 14,
    );

       
        if (module_exists('uc_attribute')) {
          //add attribute fields
          //get all attribute ids
          $db_result = db_query("SELECT aid FROM {uc_attributes}");
          $attribute_ids = array();
          while ($aid = db_fetch_object($db_result))
            $attribute_ids[] = $aid->aid;
          //get options for each attribute and add to fields array
          foreach ($attribute_ids as $aid) {
            $attribute = uc_attribute_load($aid);
            foreach (array('enabled', 'required', 'ordering') as $f) {
              $fields['ucatr:'. $attribute->aid. ':'. $f] =   'Product attr.: '.$attribute->name. ': '. $f;
            }
            foreach ($attribute->options as $option) {
              foreach (array('enabled', 'cost', 'price', 'weight', 'ordering') as $f) {
                $fields['ucatr:'. $attribute->aid. ':'. $option->oid. ':'. $f] =   'Product attr.: '.$attribute->name. ': '. $option->name. ': '. $f;
              }
            }
          }
        }
    return $fields;
  }
}

/**
* Implementation of hook_node_import_prepare().
*/
function uc_product_node_import_prepare(&$node, $preview = FALSE) {
  $errors = array();
  if (_uc_product_node_import_is_product($node->type)) {
    $currency_error = t(' is not valid. It must only contain digits, an optional decimal marker (%decimal), an optional currency symbol (%currency) and optional thousands markers (%thousand).', array('%decimal' => variable_get('uc_currency_dec', '.'), '%currency' => variable_get('uc_currency_sign', '$'), '%thousand' => variable_get('uc_currency_thou', ',')));
   
    //NAME and SKU
   
    if (!isset($node->title) || $node->title == '') {
      $errors[] = t('Product name is required.');
    }
   
    if (!isset($node->model) || $node->model == '') {
      $errors[] = t('Product SKU is required.');
    }
   
    //COST / SELL / PRICE
   
    if (isset($node->cost)) {
      $cost = _uc_product_normalize_price($node->cost);
      if ($cost === FALSE) {
        $errors[] = t('Cost price \'%value\'', array('%value' => check_plain($node->cost))). $currency_error;
      }
      else {
        $node->cost = $cost;
      }
    }
   
    if (!isset($node->sell_price) || $node->sell_price == '') {
      $errors[] = t('Sell price is required');
    } else {
      $sell_price = _uc_product_normalize_price($node->sell_price);
      if ($sell_price === FALSE) {
        $errors[] = t('Sell price \'%value\'', array('%value' => check_plain($node->sell_price))). $currency_error;
      }
      else {
        $node->sell_price = $sell_price;
      }
    }
   
    if (isset($node->list_price)) {
      $list_price = _uc_product_normalize_price($node->list_price);
      if ($list_price === FALSE) {
        $errors[] = t('List price \'%value\'', array('%value' => check_plain($node->list_price))). $currency_error;
      }
      else {
        $node->list_price = $list_price;
      }
    }
   
    //WEIGHT and DIMENSIONS
   
    foreach (array('weight' => 'Weight', 'length' => 'Length', 'width' => 'Width', 'height' => 'Height') as $field => $label) {
      if (isset($node->$field)) {
        if ($node->$field == '')
          $node->$field = 0;
        else if (!is_numeric($node->$field))
          $errors[] = t('!label \'%value\' is not valid. It must be a number.', array('%value' => check_plain($node->$field), '!label' => t($label)));
        else if ($node->length < 0)
          $errors[] = t('!label \'%value\' is not valid. It must be greater than or equal to 0.', array('%value' => check_plain($node->$field), '!label' => t($label)));
      }
    }
   
    if (isset($node->weight_units)) {
      $node->weight_units = strtolower($node->weight_units);
      if (!is_valid_weight_unit($node->weight_units))
      $errors[] = t('Weight unit \'%value\' is not valid. It must be one of %units.', array('%value' => check_plain($node->weight_units), '%units' => join(valid_weight_units(), ', ')));
    }
   
    if (isset($node->length_units)) {
      $node->length_units = strtolower($node->length_units);
      if (!is_valid_dimension_unit($node->length_units))
      $errors[] = t('Dimensions unit \'%value\' is not valid. It must be one of %units.', array('%value' => check_plain($node->length_units), '%units' => join(valid_dimension_units(), ', ')));
    }
   
    //PACKAGE and DEFAULT QUANTITIES
   
    foreach (array('pkg_qty' => 'Package quantity', 'default_qty' => 'Default quantity') as $field => $label) {
      if (!isset($node->$field) || $node->$field == '')
        $node->$field = 1;
      else if (!is_intval($node->$field))
        $errors[] = t('!label \'%value\' is not valid. It must be an integer.', array('%value' => check_plain($node->$field), '!label' => t($label)));
      else if ($node->$field < 0)
        $errors[] = t('!label \'%value\' is not valid. It must be greater than or equal to 0.', array('%value' => check_plain($node->$field), '!label' => t($label)));
    }
   
    //ORDERING
   
    if (!isset($node->ordering) || $node->ordering == '')
      $node->ordering = 0;
    else if (!is_intval($node->ordering))
      $errors[] = t('List position \'%value\' is not valid. It must be an integer (either positive or negative).', array('%value' => check_plain($node->ordering)));
    //don't do range check here because nothing will break if it's greater than the range allowed by the product editing form, and it allows more flexibility
   
    //SHIPPABLE
   
    if (!is_bool_value($node->shippable))
      $errors[] = t('Shippable value \'%value\' is not valid. It must be one of %bools.', array('%value' => check_plain($node->shippable), '%bools' => join(bool_values(), ', ')));
    else
      $node->shippable = is_true_value($node->shippable);
   
    //ATTRIBUTES
   
    if (module_exists('uc_attribute')) {
      foreach ($node as $key => $value) {
        if (stripos ($key, 'ucatr') === 0) {
          $attr = explode(':', $key);
          if (count($attr) == 3) { //attribute values
            switch ($attr[2]) {
              case 'enabled':
                if (!is_bool_value($value))
                  $errors[] = t('Attribute enabled value \'%value\' is not valid. It must be one of %bools.', array('%value' => check_plain($value), '%bools' => join(bool_values(), ', ')));
                else
                  $node->$key = is_true_value($value);
                break;
              case 'required':
                if (!is_bool_value($value))
                  $errors[] = t('Attribute required value \'%value\' is not valid. It must be one of %bools.', array('%value' => check_plain($value), '%bools' => join(bool_values(), ', ')));
                else
                  $node->$key = is_true_value($value);
                break;
              case 'ordering':
                if (!is_intval($value))
                  $errors[] = t('Attribute ordering value \'%value\' is not valid. It must be an integer.', array('%value' => check_plain($value)));
                else if ($value < -10 || $value > 10)
                  $errors[] = t('Attribute ordering value \'%value\' is not valid. It must be in the range -10 to 10.', array('%value' => check_plain($value)));
                break;
            }
          } else { //attribute option values
            switch ($attr[3]) {
              case 'enabled':
                if (!is_bool_value($value))
                  $errors[] = t('Attribute option enabled value \'%value\' is not valid. It must be one of %bools.', array('%value' => check_plain($value), '%bools' => join(bool_values(), ', ')));
                else
                  $node->$key = is_true_value($value);
                break;
             
              case 'cost':
                $cost = _uc_product_normalize_price($value);
                if ($cost === FALSE)
                  $errors[] = t('Attribute option cost \'%value\'', array('%value' => check_plain($value))). $currency_error;
                else
                  $node->$key = $cost;
                break;
             
              case 'price':
                $price = _uc_product_normalize_price($value);
                if ($price === FALSE)
                  $errors[] = t('Attribute option price \'%value\'', array('%value' => check_plain($value))). $currency_error;
                else
                  $node->$key = $price;
                break;
             
              case 'weight':
                if (!is_numeric($value))
                  $errors[] = t('Attribute option weight \'%value\' is not valid. It must be a number.', array('%value' => check_plain($value)));
                else if ($value < 0)
                  $errors[] = t('Attribute option weight \'%value\' is not valid. It must be greater than or equal to 0.', array('%value' => check_plain($value)));
                break;
             
              case 'ordering':
                if (!is_intval($value))
                  $errors[] = t('Attribute option ordering value \'%value\' is not valid. It must be an integer.', array('%value' => check_plain($value)));
                else if ($value < -10 || $value > 10)
                  $errors[] = t('Attribute option ordering value \'%value\' is not valid. It must be in the range -10 to 10.', array('%value' => check_plain($value)));
                break;
            } //switch ($attr[3])
          } //if (count($attr) == 3) else
        }
      }
    }
  }
  return $errors;
}


/**
* Implementation of hook_node_import_postprocess()
*/
function uc_product_node_import_postprocess(&$node, $preview, $error) {
  if (_uc_product_node_import_is_product($node->type) && !$preview && !$error) {
    if (module_exists('uc_attribute')) {
      //Add attribute data to database
      $attribute_enabled = array(); //$attributes[aid][field]
      $attribute_options = array(); //$attribute_options[aid][oid][field]
      foreach ($node as $key => $value) {
        if (stripos ($key, 'ucatr') === 0) {
          $attr = explode(':', $key);
          if (count($attr) == 3) { //attribute value
            $attributes[$attr[1]][$attr[2]] = $value;
          } else { //attribute option value
            $attribute_options[$attr[1]][$attr[2]][$attr[3]] = $value;
          }
        }
      }
     
      $clear_adjustments = false;
      foreach ($attribute_options as $aid => $options) {
        if (isset($attributes[$aid]['enabled']) && $attributes[$aid]['enabled']) {
          //get default values for attribute
          $attr_default = db_fetch_object(db_query("SELECT ordering, required FROM {uc_attributes} WHERE aid = %d", $aid));
          //update ordering and required fields for product
          if (isset($attributes[$aid]['ordering']))
            $attr_default->ordering = $attributes[$aid]['ordering'];
          if (isset($attributes[$aid]['required']))
            $attr_default->required = $attributes[$aid]['required'] ? 1 : 0;
         
          //add attribute to product if necessary
          if (db_num_rows(db_query("SELECT aid FROM {uc_product_attributes} WHERE nid = %d AND aid = %d", $node->nid, $aid)) == 0) {
            db_query("INSERT INTO {uc_product_attributes} (nid, aid, ordering, default_option, required, display) SELECT %d, aid, %d, 0, %d, display FROM {uc_attributes} WHERE aid = %d", $node->nid, $attr_default->ordering, $attr_default->required, $aid);
            //if an attribute was added we must reset the sku attribute adjustments data
            $clear_adjustments = true;
          } else { //update product attribute data
            db_query("UPDATE {uc_product_attributes} SET ordering = %d, required = %d WHERE nid = %d AND aid = %d", $attr_default->ordering, $attr_default->required, $node->nid, $aid);
          }
         
          //set options data
          foreach ($options as $oid => $fields) {
            if (isset($fields['enabled'])) {
              //remove all existing option data
              db_query("DELETE FROM {uc_product_options} WHERE nid = %d AND oid = %d", $node->nid, $oid);
              if ($fields['enabled']) {
                db_query("INSERT INTO {uc_product_options} (nid, oid, cost, price, weight, ordering) VALUES (%d, %d, %f, %f, %f, %d)",
                        $node->nid, $oid, $fields['cost'], $fields['price'], $fields['weight'], $fields['ordering']);
              } else {
                $match = 'i:'. $aid .';s:'. strlen($oid) .':"'. $oid .'";';
                db_query("DELETE FROM {uc_product_adjustments} WHERE nid = %d AND combination LIKE '%%%s%%'", $node->nid, $match);
              }
            }
          }
        } else { //if ($attribute_enabled[$aid])
          //remove attribute from product
          db_query("DELETE FROM {uc_product_attributes} WHERE nid = %d AND aid = %d", $node->nid, $aid);
          $clear_adjustments = true;
        }
      }
     
      if ($clear_adjustments)
        db_query("DELETE FROM {uc_product_adjustments} WHERE nid = %d", $node->nid);
    }
  }
}


/**
* Check whether the node_import $type provided to the hooks is an ubercart product.
*/
function _uc_product_node_import_is_product($type) {
/*if (in_array($type, module_invoke_all('product_types'))) {
return TRUE;
}
  return FALSE;*/
  return TRUE;
}


/**
* Make a human formatted price (eg $123,456.78) to a plain decimal (eg 123456.78).
*/
function _uc_product_normalize_price($price) {
  $price = trim($price);
  $price = str_replace(variable_get('uc_currency_thou', ','), '', $price);
  $price = str_replace(variable_get('uc_currency_dec', '.'), '.', $price);
  $price = str_replace(variable_get('uc_currency_sign', '$'), '', $price);
 
  if (empty($price) || is_numeric($price) || preg_match('/^\d*(\.\d*)?$/', $price))
    return $price;
  return FALSE;
}


function is_intval($value) {
  return preg_match('/^[+-]?[0-9]+$/', $value) === 1;
}


function is_bool_value($val) {
  return in_array(strtolower($val), bool_values());
}
function is_true_value($val) {
  return in_array(strtolower($val), true_values());
}
function is_false_value($val) {
  return in_array(strtolower($val), false_values());
}
function bool_values() {
  return array_merge(true_values(), false_values());
}
function true_values() {
  return array('1', 'y', t('yes'), 't', t('true'));
}
function false_values() {
  return array('0', 'n', t('no'), 'f', t('false'));
}

function is_valid_weight_unit($val) {
  return in_array($val, valid_weight_units());
}
function valid_weight_units() {
  return array('lb','oz','kg','g');
}

function is_valid_dimension_unit($val) {
  return in_array($val, valid_dimension_units());
}
function valid_dimension_units() {
  return array('in','ft','cm','mm');
}

#68

zigen - September 25, 2009 - 09:13

Subscribing

#69

MaierWerx - September 28, 2009 - 19:53
Title:node_import & ubercart 2» node_import & ubercart 2 (Revisited)
Category:bug report» support request
Status:needs work» active

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.

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!

#70

zeezhao - September 29, 2009 - 16:13

MaierWerx - have you made this change: http://drupal.org/node/569596

#71

MaierWerx - September 29, 2009 - 20:01
Title:node_import & ubercart 2 (Revisited)» node_import & ubercart 2

Zeezhao - 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...

#72

holsworth - September 29, 2009 - 21:37

subscribing.
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.

#73

bearstar - October 1, 2009 - 17:20

Subscribing

#74

MaierWerx - October 8, 2009 - 05:20

FYI -

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...

#75

pcorbett - October 11, 2009 - 21:58

I have not attempted to actually import anything, but I did receive this error when trying to use this module to import other content types:

Fatal error: Call to undefined function uc_product_node_is_product() in /var/www/gocsi.redfinsolutions.net/sites/all/modules/node_import/supported/ubercart/uc_product.inc on line 15

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:

function uc_product_is_product()

This allows node_import to get past screen/step 3.

#76

alzum - October 12, 2009 - 10:17

I 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!!

#77

MadOverlord - October 28, 2009 - 23:00

I 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)

#78

rhl6856 - November 2, 2009 - 21:19

suscribing, 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.

#79

rhl6856 - November 2, 2009 - 21:20

suscribing, 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.

#80

rhl6856 - November 2, 2009 - 21:21
Version:6.x-1.x-dev» 6.x-1.0-rc4

suscribing, 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!)

#81

hassansr - November 11, 2009 - 04:09

can 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

#82

Zalatar - November 12, 2009 - 16:26

Attached 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.

AttachmentSize
Test Upload.csv_.txt 706 bytes

#83

zeezhao - November 13, 2009 - 09:50

#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.

AttachmentSize
node_import-patched-by-zeezhao.tgz 114.78 KB

#84

Zalatar - November 13, 2009 - 18:05

Glad to hear it is working.
Z

 
 

Drupal is a registered trademark of Dries Buytaert.