When running a node import job for Ubercart Products (Ubercart version 6.x-2.0-rc6) there is a fatal import error for each item with the following text 'Dimensions are required for custom packaging'. This error is generated by the 'uc_ups_product_alter_validate' method in Ubercart shipping module 'uc_ups.module'. This error is generated when physical dimensions of a product are not specified.
The current implementation of the Ubercart Product import does have a mapping for product dimension i.e. length, width, and height. However, the values read from the import source are not being properly mapped so that when 'uc_ups_product_alter_validate' is executed the dimension values are all zero.
I do have a workaround. In the 'node_import' module you can update the file 'uc_product.inc' under folder 'supported/ubercart'. You must change the array's dimension keys to have a prefix of 'dim_'. For example, change $fields['length']
to $fields['dim_length']
. This will allow the import to work properly. As a result of this change it seems that the import wizard will not automatically map columns named without the 'dim_' prefix to the appropriate dimension field. But of course you can do this manually.
Comment | File | Size | Author |
---|---|---|---|
#1 | node_import-568574.patch | 1.06 KB | elliotttf |
Comments
Comment #1
elliotttf CreditAttribution: elliotttf commentedJust wanted to confirm that this does work and attach a patch for the fix neliason describes.
Comment #2
elliotttf CreditAttribution: elliotttf commentedComment #3
scholar CreditAttribution: scholar commentedCame up with the same solution, should have checked for a patch first.
This works.
Comment #4
FiNeX CreditAttribution: FiNeX commentedI've just tested the patch and I've correctly imported the dimensions field (ubercart 2.0). Without the patch it wasn't possible to import those fields.
Comment #5
nyl_auster CreditAttribution: nyl_auster commentedThis patch works like a charm and should be commited :-)
Comment #6
sgriffin CreditAttribution: sgriffin commentedsubscribing
Comment #7
arpieb CreditAttribution: arpieb commentedJust ran into this myself on an import. Disabling UPS shipping was not an option as we had several rules and rates set up and didn't want to have to set it up all over again. The patch worked like a charm.
PLEASE apply this patch to the Ubercart product import module!
Comment #8
dimitriseng CreditAttribution: dimitriseng commentedI have tested this patch on Drupal 6.22 and I can confirm that this works, can this be commited please?
Comment #9
miss-susan CreditAttribution: miss-susan commentedTested on Drupal 6.25 with Ubercart 2.7 and Node Import 1.1, everything works. Please commit the patch.
Comment #10
thaistore CreditAttribution: thaistore commentedThis module sucks big time, i use dev 1.1 did the patch and only on preview I see first line of excel imported, only first one
Then it imports first item over and over again.....!!!!
This just sucks, here is te screenshot, please help, I am late with doing import because of this stupid module
Comment #11
kopt CreditAttribution: kopt commented#1 Tested on Drupal 6.26 with Ubercart 6.x-2.8 and 6.x-1.x-dev (2011-Апр-22), everything works.
Comment #12
thaistore CreditAttribution: thaistore commentedtested on latest version after drupal update, it does not work again, get same error!!!!
cant you people fix this module alrady?
for god sake
Comment #13
thaistore CreditAttribution: thaistore commentedI applied the patch and now I get repeated product imported!!!!!!!!!!!!!!!!!!!!!!!!!
warning: Invalid argument supplied for foreach() in /home1/xxxxxxxx/public_html/modules/taxonomy/taxonomy.module on line 69.
Stock data: Array ( [active] => 1 [stock] => 0 [threshold] => 1 [nid] => 3079 )
Comment #14
kenorb CreditAttribution: kenorb commented