If this is your first visit, check our documentation. To post, register or login.

Intermittent duplicate orders

Started by badarac on 12 Nov 2015, 6:33 PM · Views: 2,896

Results 1 to 6 of 6
12 Nov 2015, 6:33 PM
#1
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Intermittent duplicate orders

I've been debugging intermittent duplicate orders on a 1.3.9h site. Looking at the logs it appears that the customer is hitting the confirm order button multiple times and it creates a new order each time. I found and applied changes from the forums related to using CSS buttons. This has not solved the problem. I turned on debug so I have log files but nothing is jumping out at me as the cause of the problem. Any suggestions on how to stop this or debug it?

12 Nov 2015, 7:29 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Intermittent duplicate orders

I believe that this has been addressed in at least ZenCart v1.5.4 with ajax

<?php
  echo zen_draw_form('checkout_confirmation', $form_action_url, 'post', 'id="checkout_confirmation" onsubmit="submitonce();"');
?>

You are using about 5 year old code - time to upgrade

Zen-Venom Get Bitten

12 Nov 2015, 7:47 PM
#3
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: Intermittent duplicate orders

kobra:

I believe that this has been addressed in at least ZenCart v1.5.4 with ajax

<?php echo zen_draw_form('checkout_confirmation', $form_action_url, 'post', 'id="checkout_confirmation" onsubmit="submitonce();"'); ?>
> You are using about 5 year old code - time to upgrade
Thanks for that. That line of code is already there. I'm in the process of going through the upgrade but it's still going to take some time. This 1.3.9 install was heavily modified. Any other ideas?
12 Nov 2015, 11:50 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Intermittent duplicate orders

I thought that the transition from $_GET to $_POST commands was part of the solution... Been a while since worried about that issue. Thought that was a revision into 1.5.x.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

13 Nov 2015, 2:45 AM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Intermittent duplicate orders

That line of code is already there.
I do not see any implementation of "ajax" in a fresh copy of 1.3.9
That file is tpl_ajax_checkout_confirmation_default.php

Zen-Venom Get Bitten

13 Nov 2015, 4:05 PM
#6
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: Intermittent duplicate orders

kobra:

I do not see any implementation of "ajax" in a fresh copy of 1.3.9
That file is tpl_ajax_checkout_confirmation_default.php
Sorry, I misunderstood what you were trying to tell me. I focused on the "submitonce" which was in red as the solution. That of course was part of the line in 1.3.9.