Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

default payment automatically selected


Recommended Posts

I have this code for default payment automatically selected when there's more than one payment in checkout_payment.php:


<?php          if (sizeof($selection) > 1) {          if ($i == 0) {                 $checked = true;                          } else {             $checked = false;                 }                     echo tep_draw_radio_field('payment', $selection[$i]['id'], $checked);           } else {                 echo tep_draw_hidden_field('payment', $selection[$i]['id']);           }?>


It works when the page checkout_confirmation.php is loaded but doesn't work with checkout.php.


How do I make One Page Checkout do automatic payment selection?

Link to comment
Share on other sites

Have you added the code to "count" the number of payment methods as well?

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile


Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.


For links mentioned in old answers that are no longer here follow this link Useful Threads.


If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...