Active
Project:
UC Node Checkout
Version:
6.x-2.0-beta8
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Oct 2012 at 22:10 UTC
Updated:
29 Oct 2012 at 22:10 UTC
The can_ship section of the cart_item hook implementation will trigger on any item in the shopping cart, even for the ones that uc_node_checkout does not govern. As a result, attempting to load the node for $item->data['nid'] will fail and node_checkout displays an error message that is actually misleading in this case.
The way to fix this is to insert a test for the current node being a real node_checkout node right after the "case can_ship", like this:
case 'can_ship':
if (isset($item->data['node_checkout_nid'])) {
........
}
and execute everything in this section only if node_checkout_nid is set, which will only be true for nodes governed by node_checkout.