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.

CommentFileSizeAuthor
#1 node_import-568574.patch1.06 KBelliotttf

Comments

elliotttf’s picture

StatusFileSize
new1.06 KB

Just wanted to confirm that this does work and attach a patch for the fix neliason describes.

elliotttf’s picture

Version: 6.x-1.0-rc4 » 6.x-1.x-dev
scholar’s picture

Status: Active » Reviewed & tested by the community

Came up with the same solution, should have checked for a patch first.
This works.

finex’s picture

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

nyl_auster’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

This patch works like a charm and should be commited :-)

sgriffin’s picture

subscribing

arpieb’s picture

Priority: Normal » Major

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

dimitriseng’s picture

I have tested this patch on Drupal 6.22 and I can confirm that this works, can this be commited please?

miss-susan’s picture

Tested on Drupal 6.25 with Ubercart 2.7 and Node Import 1.1, everything works. Please commit the patch.

thaistore’s picture

This 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

kopt’s picture

#1 Tested on Drupal 6.26 with Ubercart 6.x-2.8 and 6.x-1.x-dev (2011-Апр-22), everything works.

thaistore’s picture

tested on latest version after drupal update, it does not work again, get same error!!!!
cant you people fix this module alrady?

for god sake

thaistore’s picture

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

kenorb’s picture

Issue summary: View changes
Status: Patch (to be ported) » Needs review