On this page
UC Node Checkout 2.x
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
The module can be configured within the Ubercart store configuration at admin/store/settings/node-checkout.
The default listing will show all of your content types and allow you to bind a product (or multiple products through the view selector) to each.
The 1.x version required a conditional action to set values of hidden fields to make the link between checkout node and the order, as well as ensure any checkout nodes that were not "paid for" were distinguishable from those that were. There have been a few improvements to this branch that make this unnecessary. A link is automatically added to the checkout node to link to the order that was completed and a link back to the checkout node is also on the order page so you can easily go back and forth. This is also a simple way to see if the order associated with the checkout node was completed or not since if there's no link, no order was completed.
Conditional actions
If you're using Conditional Actions, you can access and change values of the node being checked out with the following code snippet:
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[LANGUAGE_NONE]['0']['value'] = 1;
$node->field_orderid[LANGUAGE_NONE]['0']['value'] = $order->order_id;
node_save($node);
}
}
}
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion