I am using the uc_node_checkout and I need to set some fields that I have created. The php code is this
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_productid['0']['value'] = $order->order_id;
node_save($node);
}
}
}
If I create an order and add this line to the end of the php code, it dies and show a number. die($node->field_productid['0']['value']); When I remove that line and place and order the productid is empty.