Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    33
    Plugin Contributions
    0

    Default Auto-Check Credit Card Option

    Hey - just wondering how I would have the credit card option group auto-selected on the payment page.

    I have several types of payments available, and none are selected by default.

    I have customers tell me that they enter their credit card info then press next only to find that they missed the select option for choosing credit card as their payment method.

    I poked around a bit earlier but the code in the particular area that generates the payment info for checkout is more involved than I have experience with.

    I did search the forum but with no luck.

    ZC 1.3.8a
    ZC 1.3.8a on Linux with lots o' mods

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Auto-Check Credit Card Option

    Out-of-the-box, Zen Cart *will* auto-check the radio button next to the credit-card input fields as soon as the customer clicks in them to enter their credit card number.
    Perhaps you're using older addons which don't have the new code in them?
    For the auto-check logic to work, the module needs to have the proper javascript triggers in the module code, and the javascript needs to exist on the checkout_payment page (which it does in a default install).
    .

    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
    Nov 2007
    Posts
    33
    Plugin Contributions
    0

    Default Re: Auto-Check Credit Card Option

    Very possible. Over time I think there may be a dozen or more mods installed. And that doesn't count my own tinkering.

    Now that I know that it should be selected by default, I'll do some comparisons between current and original files and see if I can find what needs to be changed.

    I appreciate the input.
    ZC 1.3.8a on Linux with lots o' mods

  4. #4

    Default Re: Auto-Check Credit Card Option

    I am running into this problem as well, thanks for the insight Dr. Byte. I wasn't sure where to look for fix this problem correctly, so I hardcoded my credit card payment method as the default and thought others might like to do the same. I found this section of code in tpl_checkout_payment_default.php:

    Code:
    <?php echo zen_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $_SESSION['payment'] ? true : false), 'id="pmt-'.$selection[$i]['id'].'"'); ?>
    and replaced it with:

    Code:
    <?php echo zen_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == 'your_payment_gateway_name_here'), 'id="pmt-'.$selection[$i]['id'].'"'); ?>
    where your_payment_gateway_name_here is replaced with the name of your particular payment gateway. You can find the name of your payment gateway by viewing the source of your checkout payment page and looking for:

    Code:
    <input type="radio" name="payment"
    the name of your payment gateway is directly after that.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 23 Jun 2012, 10:58 PM
  2. I want to delete the credit card option in my check out page.
    By jnb41578 in forum Customization from the Admin
    Replies: 7
    Last Post: 17 Jul 2011, 07:28 PM
  3. Credit Card Check Out error, help, can not process credit cards after Super Orders
    By ciscomemory_net in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 28 Jul 2009, 06:01 AM
  4. want to Auto Mask Credit card - Super Orders
    By khoa in forum Managing Customers and Orders
    Replies: 1
    Last Post: 19 Sep 2006, 09:10 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