Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Posts
    1,155
    Plugin Contributions
    0

    Default Disable Auto Selection of Payment in checkout - how ?

    If there is only one payment option, zen automatically selects it, there is no radio button

    I want to disable this feature so that each customer must actively select whatever payment option, even if only a single payment option, so that they are clear about what is happening.

    There have been a few times where a customer will say that they couldn't find the way to pay. They might not have read the payment dialogue that is displayed when only a single payment method is available.

    Would anyone know how I could do this (so that the customer must select their payment choice each time)?

    Many thanks :-)

  2. #2
    Join Date
    Nov 2003
    Posts
    1,155
    Plugin Contributions
    0

    Default Re: Disable Auto Selection of Payment in checkout - how ?

    [timed out]

    Looks like it has something to do with the following code in /includes/classes/payment.php. Would I just comment this stuff out?

    Code:
    // if there is only one payment method, select it as default because in
          // checkout_confirmation.php the $payment variable is being assigned the
          // $_POST['payment'] value which will be empty (no radio button selection possible)
          if ( (zen_count_payment_modules() == 1) && (!isset($_SESSION['payment']) || (isset($_SESSION['payment']) && !is_object($_SESSION['payment']))) ) {
            if (!$credit_covers) $_SESSION['payment'] = $include_modules[0]['class'];
          }
    
          if ( (zen_not_null($module)) && (in_array($module, $this->modules)) && (isset($GLOBALS[$module]->form_action_url)) ) {
            $this->form_action_url = $GLOBALS[$module]->form_action_url;
          }

  3. #3
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,291
    Plugin Contributions
    1

    Default Re: Disable Auto Selection of Payment in checkout - how ?

    Although the topic below with something different, may be it have info for reference.
    Pre-Select A Payment Option at check-out?.

    .
    A New Starter again

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

    Default Re: Disable Auto Selection of Payment in checkout - how ?

    tpl_checkout_payment_default.php

    Code:
      if (sizeof($selection) > 1) {
    Set that to 0 in both places.

    and then
    /includes/classes/payment.php
    comment this line, like this:
    Code:
    //        if (!$credit_covers) $_SESSION['payment'] = $include_modules[0]['class'];
    .

    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.

  5. #5
    Join Date
    Nov 2003
    Posts
    1,155
    Plugin Contributions
    0

    Default Re: Disable Auto Selection of Payment in checkout - how ?

    Excellent - thanks so much, Dr :-)

 

 

Similar Threads

  1. Disable Payment options during checkout
    By Wilkesy in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 14 Apr 2009, 09:03 AM
  2. Replies: 1
    Last Post: 19 Aug 2008, 05:15 AM
  3. How to disable the view cart after a selection is made.
    By awhfy99 in forum General Questions
    Replies: 2
    Last Post: 8 Mar 2007, 05:08 AM
  4. How prevent auto-selection of payment option when only 1 payment option available
    By DogTags in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 3 Jun 2006, 01:24 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