keat Posted November 1, 2016 Share Posted November 1, 2016 Despite some very strong wording and button name changes, we still get the odd customer who presses the back button and makes amendments to his order, which then causes all sorts of issues for us. When a customer reaches the payment gateway page is there a way to have the order locked. I thought about removing the back button, but this wouldn't fully alleviate the problem, as you can close the browser and go back in. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted November 1, 2016 Share Posted November 1, 2016 Impliment the code changes I came up with in this GitHub ticket, it will solve the issue with customers being able to overwrite the orders. Are there any other reasons this is or could cause you a problem? https://github.com/cubecart/v6/issues/1012 Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 1, 2016 Share Posted November 1, 2016 This one is a bloody stinker. Which code change are you referring to Alec? If you click the date one the comment it will give us a direct link. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted November 1, 2016 Share Posted November 1, 2016 https://github.com/cubecart/v6/commit/36b55168f7f55331ecc6e62cd24dc49c0ad48e5f Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 1, 2016 Share Posted November 1, 2016 Ah good so that did make it into 6.1 Quote Link to comment Share on other sites More sharing options...
keat Posted November 1, 2016 Author Share Posted November 1, 2016 Whilst I've suffered from the issue in the GitHub post, this is something a little different. I have orders set to email at pending as send at processing is unreliable. At pending, customers will click the back button and change his order, but the store only send the email once. When this happens, it sends the sales office in to frenzy, and I get ear ache from them. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted November 1, 2016 Share Posted November 1, 2016 when an order is processed by your sakes office, the staff log into the store to view the order, right? the email is really only a notification that an order has been placed and shouldn't be used as a picking list etc. If the team are trying to process orders that have not yet been paid for, it's only natural that sometimes the order will change. i would recommend using the e-mail notification at the processing state, so at least your only being notified once a payment has been received. Quote Link to comment Share on other sites More sharing options...
keat Posted November 1, 2016 Author Share Posted November 1, 2016 No. The sales team don't use the admin control panel. They use the email notification, and then match this up with a payment notification or in the case of a customer who has a credit account 'POF' If they fail to receive a payment notification from the gateway, the order is set aside for an hour, before chasing the customer. The problem arises when the order arrives (via email) and the subtotal doesn't match what they gateway has sent. In all cases it's because the customer clicked the 'secure checkout' button and then went back and changed his order. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted November 1, 2016 Share Posted November 1, 2016 The same work around I linked to above will address this issue as well. If the order changed, it will create a new order with the ammended details rather than update the previous one. Quote Link to comment Share on other sites More sharing options...
keat Posted November 1, 2016 Author Share Posted November 1, 2016 I'm not convinced. I have a dummy order open as we speak, and have clicked the secure checkout button and then clicked the back button a number of times and added to my order, but there is only one order pending in the admin side. Whilst I know what I've done, the admin staff will have only had the first confirmation with a single item. My basket now has a dozen items and is a different subtotal. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted November 1, 2016 Share Posted November 1, 2016 ah, yup... so that code looks at the order. If it is still pending it will allow it to be overwritten. in your case it will still be pending, so can be updated. You can change the logic of that line of code to always force it to create a new order if needed. Quote Link to comment Share on other sites More sharing options...
keat Posted November 1, 2016 Author Share Posted November 1, 2016 I assume this is where 'status=>1 comes in ?. Although I don't profess to understand any of the code, I can only make assumptions based on logic, of which it contains very little to me. (isset($this->_basket['cart_order_id']) && !empty($this->_basket['cart_order_id']) && ($check = $GLOBALS['db']->select('CubeCart_order_summary', array('cart_order_id'), array('cart_order_id' => $this->_basket['cart_order_id'], 'status' => 1), false, false, false, false))) { + // Order has already been placed and is still pending, so we only need to update Quote Link to comment Share on other sites More sharing options...
Noodleman Posted November 1, 2016 Share Posted November 1, 2016 try this. It's untested, jsut a minor change to check if 1 = 2. it will always be false and should make it create a new order. isset($this->_basket['cart_order_id']) && !empty($this->_basket['cart_order_id']) && ($check = $GLOBALS['db']->select('CubeCart_order_summary', array('cart_order_id'), array('cart_order_id' => $this->_basket['cart_order_id'], 'status' => 1), false, false, false, false) && 1=2)) { Quote Link to comment Share on other sites More sharing options...
keat Posted November 2, 2016 Author Share Posted November 2, 2016 That hung my order at index.php?_a=gateway Quote Link to comment Share on other sites More sharing options...
Noodleman Posted November 2, 2016 Share Posted November 2, 2016 hung? 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.