Hy,
When update one or more product node with programmed php script, product dimension lost.
Problem, first: the node referal dimension variabels: $node->length, $node->width, $node->height.
The function uc_product_update call mysql db_query with $node->dim_length, $node->dim_width, $node->dim_height, but this variables is all empty.
Second: function uc_product_load also use length, width, height...

Comments

millenniumtree’s picture

I'm experiencing the same issue.

This is SERIOUS because it results in a loss of entered product data, and at least in my case, will prevent orders from completing!

And when a standard is agreed upon ($node->width vs $node->dim_width), please post it here because we have a rather large application that depends on this.

I personally think it should be dim_width everywhere, because there is too much chance of having width/height/length conflict with other variables (and that's already what it is in the node submission form), but it also makes more sense to stick with what's already there, for compatibility.

tr’s picture

I suggest you post a patch so that people can review your proposed changes to make sure they don't break anything.

See http://drupal.org/patch/create

m.stenta’s picture

Status: Active » Needs review
StatusFileSize
new3.64 KB

I encountered the same problem while using the Views Bulk Operations module to assign taxonomy terms to Ubercart product nodes.

The problem is in uc_product/uc_product.module in the functions: uc_product_insert() and uc_product_update(). The dimensions are being referred to as $node->dim_length, $node->dim_height, etc., instead of the correct $node->length, $node->height, etc.

I've attached a patch that solved the problem for me.

sgriffin’s picture

+1 on the patch.

DTB’s picture

Title: Lost product dimensions (length, width, height) » Clarification

Data lost only when use nodeapi.
Not need patch, basic rule, not modify the core source!

Use own module nodeapi function, this repair the bug...

function myownedmodule_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL){ 
	switch ($op) {
                case 'load':
                   if(!$node->dim_length)	{ $node->dim_length = $node->length; }
                   if(!$node->dim_height)	{ $node->dim_height = $node->height; }
                   if(!$node->dim_width)	{ $node->dim_width = $node->width; }
                 break;
               default:
                 break;	
	}
// drupal_set_message('DIM:' .var_export($node->dim_length,true). ' LENGTH:' .var_export($node->length, true));
}

... and wait for ubercart programmers, while repair source :-)

m.stenta’s picture

I can confirm that #5 works. I've reverted the patch that I had posted (#3 above) on my setup and used the nodeapi hook instead.

millenniumtree’s picture

I'm glad it could be done without a core patch - thanks for the nodeapi hook.

This is still a very serious issue and I hope they fix it soon in core.

SeanA’s picture

Title: Clarification » Lost product dimensions (length, width, height)
bhallnc’s picture

#5 cleared this up for me concerning the product dimensions but my Default Product Pickup Address is deleted each time I modify node taxonomy terms in VBO. This is a problem because I have products with various drop-shippers, therefore each product has a specific address. Anybody know how to fix this?

Thank you in advance for any help anybody can give.

Island Usurper’s picture

Status: Needs review » Active

Unless you have a better way to fix #404234: Ajax bug on upload/delete Ubercart images, I can't commit that patch. One option would be to use dim_* everywhere, including the database columns. However, that means updating core everywhere that $product->length is used, and a notice to all of the contrib modules that might use it.

bhallnc, I think you should make a separate issue about the pickup address. While the symptoms are similar, I think we can have a different solution for it, and I don't want to work on two different things in one issue.

bhallnc’s picture

I have posted my issue at http://drupal.org/node/855558

bhallnc’s picture

I posted this issue on Ubercart Issues... should it go under Views Bulk Operations Issues instead?

Island Usurper’s picture

Status: Active » Needs review
StatusFileSize
new4.14 KB

Well, I feel silly for not thinking of this earlier. I can just assume that the dim_* properties don't have to be there, but use them for the length, width, and height if they are available.

Island Usurper’s picture

Status: Needs review » Fixed

This has been working on a site I maintain so far. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Dimm’s picture

StatusFileSize
new587 bytes
new354 bytes

http://drupal.org/node/685698#comment-2526726 update.
It work for node_export module too.

leramulina’s picture

I have Ubercart 2.9 and there is still a problem with importing dimensions through node import. I looked at uc_product.module and saw that the patch from http://drupal.org/node/685698#comment-3366822 is already accepted. But it does not work!

Then I installed uc_product_correct.module. No result again! When I reach Preview import (step 7 of 8) I see no information about dimensions. What can I do?

drupalinthailand’s picture

Issue summary: View changes

Hello,

Has anybody manages to import ubercart drupal 6 products into drupal 8 ?

Thank you if someone can help...