Results 1 to 5 of 5
  1. #1
    Join Date
    May 2005
    Posts
    110
    Plugin Contributions
    0

    Default Prevent duplicate orders by using javascript on confirm button?

    Hi,

    I have got some javascript code which I want to place on the "confirm" button on checkout_confirmation page so that once the customer clicks that button it goes inactive (ghosted) and changes from "confirm" to "please wait, processing..."

    The only problem I am having is finding the form 'checkout_confirmation' being called with the zen_draw_form function. Once I find where that is I can add the code and javascript to the page. Can anyone point me in the right direction?

    Thanks,
    Brad.

  2. #2
    Join Date
    May 2005
    Posts
    110
    Plugin Contributions
    0

    Default Re: Fix duplicate orders by using javascript on confirm button.

    Can anyone help with this one?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Fix duplicate orders by using javascript on confirm button.

    The template file for ... checkout confirmation ... would be the logical place to find such a button...
    tpl_checkout_confirmation_default.php

    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDER, BUTTON_CONFIRM_ORDER_ALT, 'name="btn_submit" id="btn_submit"') ;?></div>


    (btw ... Developers Toolkit is a handy thing when looking for known specifics ...)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    May 2005
    Posts
    110
    Plugin Contributions
    0

    Default Re: Fix duplicate orders by using javascript on confirm button.

    Hi,

    Thanks for your help but I'm looking for the actual <form> so I can implement the following fix:
    http://javascript.internet.com/forms...le-submit.html

    Brad.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Prevent duplicate orders by using javascript on confirm button?

    Same file ... about 5 lines up further ...
    Code:
    <?php
      echo zen_draw_form('checkout_confirmation', $form_action_url, 'post', 'id="checkout_confirmation" onsubmit="submitonce();"');
    
      if (is_array($payment_modules->modules)) {
        echo $payment_modules->process_button();
      }
    ?>
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDER, BUTTON_CONFIRM_ORDER_ALT, 'name="btn_submit" id="btn_submit"') ;?></div>
    </form>
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 10
    Last Post: 21 Jan 2013, 11:43 AM
  2. Duplicate orders using Cybersource
    By romanus in forum Addon Payment Modules
    Replies: 1
    Last Post: 10 Jun 2008, 01:22 AM
  3. duplicate orders using cybersource module
    By romanus in forum Addon Payment Modules
    Replies: 0
    Last Post: 4 Jun 2008, 03:00 AM
  4. Anyone know how to confirm International Orders (ie: AVS) to prevent fraud ??
    By kevinmc3 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 28 Jan 2008, 06:50 PM
  5. Duplicate Orders - Suspected from clicking Back button
    By Booch in forum General Questions
    Replies: 6
    Last Post: 14 Nov 2006, 08:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg