Author Topic: [SOLVED] Duplicate orders & payments  (Read 26910 times)

Robert_ITMan

  • Jr. Member
  • **
  • Posts: 115
    • websites developed and managed @ ourfingertips.com
  • VirtueMart Version: 3.2.12 and 3.2.15
[SOLVED] Duplicate orders & payments
« on: May 02, 2014, 15:15:09 pm »
Please help! We are getting duplicate orders & payments with current version VM 2.6.0 - I have eliminated the possibility of it being from double-clicking the confirm purchase button on checkout (see: http://forum.virtuemart.net/index.php?topic=122883.msg422084 ). VM is creating 2 orders with different order numbers and taking 2 payments. It is not happening every time nor can I see a pattern or anything in the duplicates that might lead to a certain product nor I am unable to duplicate it myself in all my tests.

If anyone else experiencing this issue - please let us know!

If I find a solution or have anything more to report I will post it here.
www.ourfingertips.com - websites developed and managed @ ourfingertips

Let me help you make the most of the technology at our fingertips

Robert_ITMan

  • Jr. Member
  • **
  • Posts: 115
    • websites developed and managed @ ourfingertips.com
  • VirtueMart Version: 3.2.12 and 3.2.15
Re: Duplicate orders & payments
« Reply #1 on: May 21, 2014, 19:50:53 pm »
SOLVED by The VM Team! I'm sure it will be in the next update (now on 2.6.0a). Here is the fix in /components/com_virtuemart/helpers/cart.php line 893 add the line $this->setCartIntoSession(); after $this->_inCheckOut = true;
Code: [Select]
private function checkoutData($redirect = true) {

$this->_redirect = $redirect;
$this->_inCheckOut = true;
$this->setCartIntoSession(); // added as instructed by VM
$this->tosAccepted = JRequest::getInt('tosAccepted', $this->tosAccepted);

I have tested this thoroughly and it works for my sites.
www.ourfingertips.com - websites developed and managed @ ourfingertips

Let me help you make the most of the technology at our fingertips

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2915
  • VirtueMart Version: 3.6.0
Re: [SOLVED] Duplicate orders & payments
« Reply #2 on: May 21, 2014, 21:18:42 pm »
Not made it into 2.6.2

Wonder why??
regards
A

Joomla 3.9.8
php 7.1

hotrod

  • Jr. Member
  • **
  • Posts: 104
  • Silver Supporting Member
Re: [SOLVED] Duplicate orders & payments
« Reply #3 on: June 10, 2014, 23:45:26 pm »
Getting the double orders..  this code is ok to add.. in VirtueMart 2.6.6
VirtueMart 2.6.8 (Patched 9/18)
Joomla 2.5.22
PHP Version    5.4.32 
Dedicated Server.
Proud Virtuemart Supporter http://forum.virtuemart.net/index.php?topic=124355.0

Robert_ITMan

  • Jr. Member
  • **
  • Posts: 115
    • websites developed and managed @ ourfingertips.com
  • VirtueMart Version: 3.2.12 and 3.2.15
Re: [SOLVED] Duplicate orders & payments
« Reply #4 on: June 10, 2014, 23:57:53 pm »
I read that this fix is included with VM 2.6.6 - are you telling me it isn't... please confirm if you are getting duplicates with VM 2.6.6 (I haven't tested it yet).

I'm still using 2.6.0a on our live site with no duplicates with the fix in /components/com_virtuemart/helpers/cart.php
www.ourfingertips.com - websites developed and managed @ ourfingertips

Let me help you make the most of the technology at our fingertips

hotrod

  • Jr. Member
  • **
  • Posts: 104
  • Silver Supporting Member
Re: [SOLVED] Duplicate orders & payments
« Reply #5 on: June 11, 2014, 00:01:23 am »
Yes.. I am..  I just updated about a week ogo.. maybe 20 orders had no issues.. then out of the blue..today  in the last 20 minutes I got hit with back to back double orders.. 

here is the code from the 2.6.6 file

Code: [Select]
private function checkoutData($redirect = true) {

$this->_redirect = $redirect;
$this->_inCheckOut = true;
$this->setCartIntoSession();
$this->tosAccepted = JRequest::getInt('tosAccepted', $this->tosAccepted);
$this->STsameAsBT = JRequest::getInt('STsameAsBT', $this->STsameAsBT);
$this->order_language = JRequest::getVar('order_language', $this->order_language);
$this->getFilterCustomerComment();

looks like its there..
VirtueMart 2.6.8 (Patched 9/18)
Joomla 2.5.22
PHP Version    5.4.32 
Dedicated Server.
Proud Virtuemart Supporter http://forum.virtuemart.net/index.php?topic=124355.0

Robert_ITMan

  • Jr. Member
  • **
  • Posts: 115
    • websites developed and managed @ ourfingertips.com
  • VirtueMart Version: 3.2.12 and 3.2.15
Re: [SOLVED] Duplicate orders & payments
« Reply #6 on: June 11, 2014, 00:13:23 am »
Thanks for the quick reply! Are you getting duplicate payments too? If so I will test 2.6.6 myself ASAP and see if I can help in anyway. In the meantime - think on any changes you may have made that might have changed your settings and possibly causing the duplicates and also document everything you can think of that might help solve this.
www.ourfingertips.com - websites developed and managed @ ourfingertips

Let me help you make the most of the technology at our fingertips

hotrod

  • Jr. Member
  • **
  • Posts: 104
  • Silver Supporting Member
Re: [SOLVED] Duplicate orders & payments
« Reply #7 on: June 11, 2014, 00:28:21 am »
Not a change.. 
and yes Payments also.. tried the double click on my dev site and I didn't get a double order.. 
Fingers crossed waiting on my next order..
Not sure what happened.. Like I said many orders with no issues after the upgrade..  then back to backs.. worries me
VirtueMart 2.6.8 (Patched 9/18)
Joomla 2.5.22
PHP Version    5.4.32 
Dedicated Server.
Proud Virtuemart Supporter http://forum.virtuemart.net/index.php?topic=124355.0

stensbo

  • Jr. Member
  • **
  • Posts: 87
Re: [SOLVED] Duplicate orders & payments
« Reply #8 on: June 11, 2014, 16:11:22 pm »
Using Joomla 2.5.20, Multi language (only DK in VM), Beez20 copy template, Virtuemart 2.6.6, PHP Version 5.3.27, vm override.

Joomla site is live - danrider.dk -  but vm shop is only for registered shopper.

I have had orders with no issue after upgrade to 2.6.6 - but yesterday I got double ordres with different order no.

Overrides is updated .

hotrod

  • Jr. Member
  • **
  • Posts: 104
  • Silver Supporting Member
Re: [SOLVED] Duplicate orders & payments
« Reply #9 on: June 11, 2014, 16:13:59 pm »
Still waiting on my next order.. we'll see..

The the hell can causue this right in the middle with nothing changed..
VirtueMart 2.6.8 (Patched 9/18)
Joomla 2.5.22
PHP Version    5.4.32 
Dedicated Server.
Proud Virtuemart Supporter http://forum.virtuemart.net/index.php?topic=124355.0

hotrod

  • Jr. Member
  • **
  • Posts: 104
  • Silver Supporting Member
Re: [SOLVED] Duplicate orders & payments
« Reply #10 on: June 11, 2014, 17:13:17 pm »
Just got another   3 in a row
VirtueMart 2.6.8 (Patched 9/18)
Joomla 2.5.22
PHP Version    5.4.32 
Dedicated Server.
Proud Virtuemart Supporter http://forum.virtuemart.net/index.php?topic=124355.0

Robert_ITMan

  • Jr. Member
  • **
  • Posts: 115
    • websites developed and managed @ ourfingertips.com
  • VirtueMart Version: 3.2.12 and 3.2.15
Re: [SOLVED] Duplicate orders & payments
« Reply #11 on: June 11, 2014, 17:52:00 pm »
hotrod - thanks for the updates! The developers have been notified - lets hope for a quick resolution! Glad I didn't update to 2.6.6 yet on my live sites (again 2.6.0a with above fix is working for me along with the script I added to eliminate double-clicking and showing 'please wait'). The duplicates I experienced before were completely random and statistically we received 1 duplicate every 16 orders - and we never experienced it on the test sites even though we tested thoroughly.
www.ourfingertips.com - websites developed and managed @ ourfingertips

Let me help you make the most of the technology at our fingertips

hotrod

  • Jr. Member
  • **
  • Posts: 104
  • Silver Supporting Member
Re: [SOLVED] Duplicate orders & payments
« Reply #12 on: June 11, 2014, 18:33:08 pm »
As of now.  I narrowed it down to THE SSL.  no double order when turned off.  I did just renew it thru godaddy and waiting for the new one to be installed.  but they say Cert can't be the isuue..  still using the old that is not expired yet.  But this has nothing to do with it.  looks like the order are being set thru the standard URL and The SSL causing the double orders..  Like I said. I made no changes and had 20 orders or more on the new version..  UGH..
VirtueMart 2.6.8 (Patched 9/18)
Joomla 2.5.22
PHP Version    5.4.32 
Dedicated Server.
Proud Virtuemart Supporter http://forum.virtuemart.net/index.php?topic=124355.0

Robert_ITMan

  • Jr. Member
  • **
  • Posts: 115
    • websites developed and managed @ ourfingertips.com
  • VirtueMart Version: 3.2.12 and 3.2.15
Re: [SOLVED] Duplicate orders & payments
« Reply #13 on: June 11, 2014, 18:47:46 pm »
Good observation - SSL issue makes sense! That could explain why we never received duplicates on our test sites. I doubt it would be with the SSL cert itself, more likely the issue is due to how VM captures the order on confirmation.
www.ourfingertips.com - websites developed and managed @ ourfingertips

Let me help you make the most of the technology at our fingertips

hotrod

  • Jr. Member
  • **
  • Posts: 104
  • Silver Supporting Member
Re: [SOLVED] Duplicate orders & payments
« Reply #14 on: June 11, 2014, 18:50:33 pm »
But all of a sudden????
VirtueMart 2.6.8 (Patched 9/18)
Joomla 2.5.22
PHP Version    5.4.32 
Dedicated Server.
Proud Virtuemart Supporter http://forum.virtuemart.net/index.php?topic=124355.0