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...
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | uc_product_correct.info | 354 bytes | Dimm |
| #16 | uc_product_correct.module.txt | 587 bytes | Dimm |
| #13 | 685698_update_dims.patch | 4.14 KB | Island Usurper |
| #3 | product-dimensions-fix.patch | 3.64 KB | m.stenta |
Comments
Comment #1
millenniumtreeI'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.
Comment #2
tr commentedI 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
Comment #3
m.stentaI 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.
Comment #4
sgriffin commented+1 on the patch.
Comment #5
DTB commentedData lost only when use nodeapi.
Not need patch, basic rule, not modify the core source!
Use own module nodeapi function, this repair the bug...
... and wait for ubercart programmers, while repair source :-)
Comment #6
m.stentaI 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.
Comment #7
millenniumtreeI'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.
Comment #8
SeanA commentedComment #9
bhallnc commented#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.
Comment #10
Island Usurper commentedUnless 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.
Comment #11
bhallnc commentedI have posted my issue at http://drupal.org/node/855558
Comment #12
bhallnc commentedI posted this issue on Ubercart Issues... should it go under Views Bulk Operations Issues instead?
Comment #13
Island Usurper commentedWell, 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.
Comment #14
Island Usurper commentedThis has been working on a site I maintain so far. Committed.
Comment #16
Dimm commentedhttp://drupal.org/node/685698#comment-2526726 update.
It work for node_export module too.
Comment #17
leramulina commentedI 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?
Comment #18
drupalinthailand commentedHello,
Has anybody manages to import ubercart drupal 6 products into drupal 8 ?
Thank you if someone can help...