I also have Super Orders and Edit Orders installed, and wanted the Reward Points to transfer from Pending to Earned when the order is paid (Complete). I don't use batch updating, so my workaround is just when the order is updated in Super Orders, check the status and run the appropriate Reward Points function.
In super_order.php, under case 'update_order': , after this:
I added this:Code:// OK, we have our Customer Notified Status Number, now update the Order Status History Table update_status($oID, $status, $customer_notified, $comments); // Is the Customer Notified Status Number a 1, then send the customer and E-Mail with the status update. if ($customer_notified == '1') { email_latest_status($oID); }
Code:if(($check_status->fields['orders_status'] < 5 && $status == 5)){ //if previous status was Pending, Shipped, or Returned AND new status is Complete/Paid TransferCustomerPointsFromPending($oID); $messageStack->add_session('Pending points transferred for Order ' . $oID , 'success'); } if(($check_status->fields['orders_status'] == 5 && $status < 5)){ //if previous status was Complete Paid AND new status is Pending, Shipped, or Returned //take back the points if somehow they un-pay TransferCustomerPointsToPending($oID); $messageStack->add_session('Earned points transferred back to Pending for Order ' . $oID , 'success'); }



