ayz1 Posted June 29, 2016 Posted June 29, 2016 We have a few customers who pay by bank transfer using the Print Order Form during checkout. Is there a way to get the Print Order Form to set the order to processing and reduce stock levels after the order has been made? Quote
Dirty Butter Posted June 29, 2016 Posted June 29, 2016 Somebody on here needed Stock reduction on Pending as I recall. But you need it only IF it's a Print Order Form Checkout. That's probably not the same situation, but I'll try to find that thread. Quote
Dirty Butter Posted June 29, 2016 Posted June 29, 2016 I search for pending stock reduce and found several threads - you would know best if any of them is useful to your situation. Quote
ayz1 Posted June 29, 2016 Author Posted June 29, 2016 Thanks Dirty Butter for the suggestion but couldn't find anything relevant when I searched. My problem is that if I leave the stock levels to reduce at a pending order some customers are pressing the back button after going to checkout then retrying to pay which means that they sometimes get a warning saying products no longer in stock. We sometimes end up with the customer having 4 or 5 pending orders in the space of a few minutes. This usually means that we are losing sales and our stock levels are incorrect until we cancel the pending or unpaid orders. I'm now thinking it would be better to set the stock levels to reduce on payment. However because we have several customers who pay by bank transfer I need the print order form orders to go straight to processing and not pending and to reduce the stock levels as if payment had been made. Quote
Dirty Butter Posted June 29, 2016 Posted June 29, 2016 There's another discussion somewhere about disabling the back button for the browser - don't think anything ever came of it, though - might have been a GitHub post. Quote
bsmither Posted June 29, 2016 Posted June 29, 2016 Please try this. In /modules/gateway/Print_order_Form/gateway.class.php: Near line 57, find: $order->logTransaction($transData); Change to: // $order->logTransaction($transData); // $transData may get modified later Near line 238, find: $GLOBALS['cart']->clear(); } } Change to: /* NEW */ $transData['status'] = 'FProc'; $transData['notes'] = 'Forced to Processing. ' . $transData['notes']; $order->orderStatus(Order::ORDER_PROCESS, $cart_order_id); /* */ $GLOBALS['cart']->clear(); } /**/ $order->logTransaction($transData); // $transData may have been modified earlier } This has the POF gateway forcing the order to processing. CubeCart's internal Order management functions (the Order 'class') manages stock levels. Quote
ayz1 Posted June 29, 2016 Author Posted June 29, 2016 A huge thank you bsmither seems to do exactly what I need. Quote
yilmazke Posted September 11, 2016 Posted September 11, 2016 On 30/06/2016 at 5:56 AM, bsmither said: Please try this. In /modules/gateway/Print_order_Form/gateway.class.php: Near line 57, find: $order->logTransaction($transData); Change to: // $order->logTransaction($transData); // $transData may get modified later Near line 238, find: $GLOBALS['cart']->clear(); } } Change to: /* NEW */ $transData['status'] = 'FProc'; $transData['notes'] = 'Forced to Processing. ' . $transData['notes']; $order->orderStatus(Order::ORDER_PROCESS, $cart_order_id); /* */ $GLOBALS['cart']->clear(); } /**/ $order->logTransaction($transData); // $transData may have been modified earlier } This has the POF gateway forcing the order to processing. CubeCart's internal Order management functions (the Order 'class') manages stock levels. Today I installed POF and have exact same problem. Order status stuck on "Pending". Even though I apply above fix, didn't solve it. CubeCart : v6.0.7 POF v1.0.1 Quote
bsmither Posted September 11, 2016 Posted September 11, 2016 Other than the line numbers between POF v100 (which is what my solution is based on) versus POF v101, there is no difference in code. In the POF control panel, do you have "Send Confirmation Email" checked? If checked, did the customer get the confirmation email? Quote
yilmazke Posted September 12, 2016 Posted September 12, 2016 After your reply, I checked and test it. However still doesn't work One thing I realized, items are still in "Basket". Even though I proceed with POF, it doesn't process at all. Quote
yilmazke Posted September 13, 2016 Posted September 13, 2016 Customer doesn't get confirmation email. On 11/09/2016 at 1:15 PM, bsmither said: Other than the line numbers between POF v100 (which is what my solution is based on) versus POF v101, there is no difference in code. In the POF control panel, do you have "Send Confirmation Email" checked? If checked, did the customer get the confirmation email? Quote
keat Posted September 14, 2016 Posted September 14, 2016 If it helps at all, I also tried this today. When choosing the 'POF' button, the site goes straight back to the home page. I don't see the status bar 'Transferring, Please Wait' And the order is still stuck on 'Pending' I have 'send confirmation email' checked. Quote
keat Posted October 20, 2016 Posted October 20, 2016 I must have missed something out of the cut & paste, as I've tried this again and it's working now. Quote
yilmazke Posted October 22, 2016 Posted October 22, 2016 When I close POF screen, it goes back to home screen. It doesn't clear shopping cart and doesn't send any confirmation email. Quote
bsmither Posted October 22, 2016 Posted October 22, 2016 Please let us know the exact version of CubeCart you are running. In CC6012, if a gateway has been chosen, the Cancel Order button should not be shown. Quote
keat Posted October 24, 2016 Posted October 24, 2016 your'e more than welcome to have a play with the one I edited if it helps. gateway.class.zip Quote
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.