Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Product kits
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 May 2009 at 20:27 UTC
Updated:
2 Mar 2012 at 00:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
cha0s commentedLyle, is there a reason we aren't node_save()ing here?
Comment #2
rszrama commentedComment #3
Island Usurper commentedThe reason node_save() doesn't work is because hook_update() doesn't actually take a $node object. It takes the form values, which have been turned into an object that is almost like a node. Usually this is OK because most node forms map very easily to the node's structure. Product kits don't. Using drupal_execute() was the easiest way around it.
Comment #4
Island Usurper commentedDuplicate of the core issue. I tried fixing the way Ubercart handled it, but I didn't get anywhere. If anyone else wants to try, they can reopen the issue.
Comment #5
longwaveReopening, with a patch to use node_save() instead, and some extra code in uc_product_kit_update() to handle this case.
Comment #6
longwaveThis is working well for me in testing, so I've committed it. Needs porting to 7.x.
Comment #7
tr commentedMoving to "Product kit" component.
Comment #8
Island Usurper commentedI had to make some changes to uc_product_kit_update() to keep the qty and discount settings on the kit. I was going to test it on Drupal 6, but I got a ridiculous 416 Range not satisfiable error on the create product kit page.
Comment #9
longwave#8: 473572_update_kits.patch queued for re-testing.
Comment #10
longwave#8: 473572_update_kits.patch queued for re-testing.
Comment #11
longwaveCommitted #8