Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Setting a default payment option?


thewitt

Recommended Posts

Is there any way to set one of the payment options to automatically be selected when you go to the payment screen.

 

Specifically I would like the Authorize.net option to be the default and be selected unless they pick something else.

 

I have a fairly high number of customers who actually enter their credit card infomation and don't check the button and so we don't get their credit card info and have to contact them for payment information.

 

Very frustrating.

 

Options?

 

Thanks,

 

-t

Link to comment
Share on other sites

  • 2 weeks later...

Hi Tim,

 

I haven't heard of a default payment but you can rank the payment option the way you want. So the most important it number 1 and the least important is last.

Than you can also of course control it by saying that people from certain areas need to use that payment method otherwise they can't buy with you.

 

I hope this is an idea for you. You can change it as always in admin -> modules -> payment and edit the payment module you want to 'rank'

 

Regards

 

Richard

 

B)

Link to comment
Share on other sites

  • 2 weeks later...

t,

 

Attached is my quick way to do this - it is not the best way because it is hard coded, but it works for me today. I may regret it tomorrow, when I can't find the modded code.

 

in checkout_payment.php

 

find

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

 

for payflowpro, replace with

<?php
   if (sizeof($selection) > 1) {
     if ($selection[$i]['id'] == "payflowpro") {
       echo tep_draw_radio_field('payment', $selection[$i]['id'], CHECKED);
     } else {
       echo tep_draw_radio_field('payment', $selection[$i]['id']);
     }
   } else {
     echo tep_draw_hidden_field('payment', $selection[$i]['id']);
   }
?>

 

replace the "payflowpro" with the id of your desired default payment. I think Authorize.net is "authorizenet" but I'm not sure.

 

Hope this helps, I'm not a pro coder, just a php hacker.

Glenn

Do you want osCommerce to make money for you?

Keep the project alive by offering your financial support.

osCommerce Support the Project

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

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

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