I am using Ubercart Node Checkout. Here is my problem. I need to create a view of only nodes that have been checked out. From what I have found I need to add a rule that updates certain fields that have been defined in my content type. Here is the code:
if (isset($order)) {
foreach ($order->products as $product) {
if (isset($product->data['node_checkout_nid'])) {
$node = node_load($product->data['node_checkout_nid']);
$node->field_status['0']['value'] = 1;
$node->field_orderid['0']['value'] = $order->order_id;
node_save($node);
}
}
}
The problem is that the fields do not have any value after this script is executed. I have put a die($node->field_orderid['0']['value']);
at the end and when checking out it shows the value, but when you go to the content page node the field is empty. These fields are used to identify nodes that have a complete order node associated with them