Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,732
    Plugin Contributions
    79

    Default [Done v155b] checkout_payment: Incorrect selector in form-submit jQuery

    Within the file /includes/modules/pages/checkout_payment/jscript_main.php, there's this section:
    Code:
        $(document).ready(function(){
          $('form[name="checkout_payment"]').submit(function() {
              $('.paymentSubmit').attr('disabled', true);
            <?php if ($flagOnSubmit) { ?>
              formPassed = check_form();
              if (formPassed == false) {
                  $('.paymentSubmit').attr('disabled', false);
              }
              return formPassed;
            <?php } ?>
          });
        });
    ... but if you look at /includes/templates/template_default/templates/tpl_checkout_payment_default.php, you'll see:
    Code:
    <div class="buttonRow forward" id="paymentSubmit"><?php echo zen_image_submit(BUTTON_IMAGE_CONTINUE_CHECKOUT, BUTTON_CONTINUE_ALT, 'onclick="submitFunction('.zen_user_has_gv_account($_SESSION['customer_id']).','.$order->info['total'].')"'); ?></div>
    Suggest changing the jQuery code to reference the "proper" selector:
    Code:
       $(document).ready(function(){
          $('form[name="checkout_payment"]').submit(function() {
              $('#paymentSubmit').attr('disabled', true);
            <?php if ($flagOnSubmit) { ?>
              formPassed = check_form();
              if (formPassed == false) {
                  $('#paymentSubmit').attr('disabled', false);
              }
              return formPassed;
            <?php } ?>
          });
        });

  2. #2
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: checkout_payment: Incorrect selector in form-submit jQuery

    Oh my. How did that get missed?

    Can I ask ... how did you stumble upon this? ie: what were the symptoms you were investigating ... so we can use those as extra tests
    .

    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.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,732
    Plugin Contributions
    79

    Default Re: checkout_payment: Incorrect selector in form-submit jQuery

    I'm in the process of creating an alternate checkout modification for a client, merging the processing for the checkout_shipping, checkout_payment and checkout_confirmation pages and just happened to notice the discrepancy during the merge.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: checkout_payment: Incorrect selector in form-submit jQuery

    .

    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. v152 Incorrect Sub-total and Total amount during checkout_payment page
    By ZkullGraveAce in forum General Questions
    Replies: 4
    Last Post: 10 Jan 2014, 02:45 AM
  2. How do I add a comment form before the submit order form?
    By hello in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 18 Jul 2010, 12:47 PM
  3. My form submit button doesn't work
    By timjbart in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 21 Aug 2008, 11:25 PM
  4. Trouble cloning - incorrect values passed to the checkout_payment page
    By bjornenke in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 9 Aug 2008, 04:42 PM
  5. Created form in EZ-page, unable to submit
    By cfe in forum General Questions
    Replies: 2
    Last Post: 28 Apr 2008, 07:46 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR