Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Disable Auto Selection of Payment in checkout - how ?

Disable Auto Selection of Payment in checkout - how ?

Locked

Views: 1,308

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
12 Oct 2006, 3:22 PM
#1
dogtags avatar

dogtags

Totally Zenned

Join Date:
Nov 2003
Posts:
876
Plugin Contributions:
1

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 :-)

12 Oct 2006, 3:34 PM
#2
dogtags avatar

dogtags

Totally Zenned

Join Date:
Nov 2003
Posts:
876
Plugin Contributions:
1

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?

// 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;
      }
12 Oct 2006, 4:39 PM
#3
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

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?.

.

12 Oct 2006, 9:07 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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

tpl_checkout_payment_default.php

  if (sizeof($selection) > 1) {

Set that to 0 in both places.

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

18 Oct 2006, 2:54 PM
#5
dogtags avatar

dogtags

Totally Zenned

Join Date:
Nov 2003
Posts:
876
Plugin Contributions:
1

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

Excellent - thanks so much, Dr :-)