I have a process which needs to node_load/node_save the checkout node between the time you add to cart and check out.
I believe the nodeapi 'update' operation may be blanking out the $node->attributes.
The solution is to set $node->attributes in the nodeapi 'load' operation.
Patch attached in the next comment.

This may actually solve some of the other 3rd-party module incompatibilities. I'm just guessing though.

Comments

millenniumtree’s picture

Title: Attributes disappear if node is re-saved between add-to-cart and checkout » Attributes/Adjustments disappear if node is re-saved between add-to-cart and checkout
Status: Active » Needs review
StatusFileSize
new862 bytes

Additionally, this bug also prevents adjustments and alternate skus from getting into the order.

Patch explained:
Pull cart attribute data from uc_cart_products table

$data = unserialize(db_result(db_query("SELECT data FROM {uc_cart_products} WHERE data LIKE '%%\"node_checkout_nid\";i:%d;%%'", $node->nid)));

Load the attributes into the node

$node->attributes = $data['attributes'];

Note that once the product is checked out, the attribute data is loaded a different way
This patch http://drupal.org/node/1131406 was also useful for me to keep the nodes around after checking out.

stewart.adam’s picture

I've experienced this issue as well. Attached patch makes a few more changes:

  • Only adds the uc_order_product_id and ucnc_product_nid indexes when the node is actually associated with uc_node_checkout
  • Only attempts to load cart data uc_order_product_id is empty (i.e. the product has not passed through checkout)