In Drupal 5.x, how does one use workflow-ng to publish a node after a person checks out? Thanks.

Comments

rszrama’s picture

Status: Active » Fixed

You'd have to write a custom PHP action that updated the node's status upon checkout completion... so, use the "User completes checkout" trigger and add an action that loops through the $order->products, looks in each product's data array for a node_checkout_nid key, and uses the value to update the node's status to 1. Sorry this is vague... requires PHP / Drupal knowledge.

tanyi’s picture

Thanks. I need help with the custom code to update the status. Can anyone help with this?

kscheirer’s picture

I've just started looking at this module, but I think you can find some here here... http://drupaleasy.com/blogs/ultimike/2009/03/event-registration-ubercart

something like 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_status['0']['value'] = 1;
      $node->field_orderid['0']['value'] = $order->order_id;
      node_save($node); 
    }
  }
}

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.