Ubercart Products - Dimensions are required for custom packaging

neliason - September 4, 2009 - 17:49
Project:Node import
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community
Issue tags:ubercart
Description

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.

#1

elliotttf - October 10, 2009 - 19:32

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

AttachmentSize
node_import-568574.patch 1.06 KB

#2

elliotttf - October 10, 2009 - 19:32
Version:6.x-1.0-rc4» 6.x-1.x-dev

#3

scholar - November 6, 2009 - 05:14
Status:active» reviewed & tested by the community

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

#4

FiNeX - November 6, 2009 - 15:42

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.

 
 

Drupal is a registered trademark of Dries Buytaert.