Moshe Nitzani Posted July 9, 2008 Share Posted July 9, 2008 Hi Does anyone know how to set the order status to Order Completed when Worldpay sends back the response after a successful transaction. I am trying to avoid having to log in to Cubecart admin and manually flag the order as Completed. My accounts department lady will eat me alive if she has to do that on top of everything else she does. Thanks Moshe Quote Link to comment Share on other sites More sharing options...
cb2004 Posted July 9, 2008 Share Posted July 9, 2008 You would have to change some code within CubeCart to make it go to Completed instead of Processing. Quote Link to comment Share on other sites More sharing options...
Moshe Nitzani Posted July 9, 2008 Author Share Posted July 9, 2008 You would have to change some code within CubeCart to make it go to Completed instead of Processing. Any idea which files I should look at? Thanks Moshe Quote Link to comment Share on other sites More sharing options...
cb2004 Posted July 9, 2008 Share Posted July 9, 2008 In modules/gateway/WorldPay/ there is a file called call.inc.php On line 45 there is this code: $order->orderStatus(3,$_POST['cartId']); Change the 3 to a 4 and I think that should do it. Backup before changing. Quote Link to comment Share on other sites More sharing options...
Moshe Nitzani Posted July 9, 2008 Author Share Posted July 9, 2008 In modules/gateway/WorldPay/ there is a file called call.inc.php On line 45 there is this code: $order->orderStatus(3,$_POST['cartId']); Change the 3 to a 4 and I think that should do it. Backup before changing. After many emails fyling between myself and Cubecart support (which was very fast and very helpful), the conclusion was that the only way for the order status to be flagged as Order Complete was to modify the code in classes/cart/order.php so that when the status is set to 3 it doesn't check to see if the product is digital or not and put the status back to 2. Find: This will just comment out the functionality to drop back to status 2. I have tested this fix and can confirm that regardless of the product type (digital or tangible) a Successful Transaction response from Worldpay automatically sets the order status to Order Complete and triggers the corresponding email. Mosheif (!$this->orderInv[$i]['digital'] && !$force) { $this->orderStatus(2, $cart_order_id); $statusId = 2; ## Safeguard $breakStatus = true; ## Stops email sending below no way to stop this case ?! break; } Replace with: /* if (!$this->orderInv[$i]['digital'] && !$force) { $this->orderStatus(2, $cart_order_id); $statusId = 2; ## Safeguard $breakStatus = true; ## Stops email sending below no way to stop this case ?! break; } */ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.