Jump to content

Archived

This topic is now archived and is closed to further replies.

dreamscape

Setting a default payment

Recommended Posts

If instead of 'true' you put $i==0, then the top payment method will be selected. I'm sure it will work with numbers other than 0 if you want something other than the top one selected.

 

 

If anyone is using fast easy checkout, and are trying to implement this, please note that you need to add the above code to payment_box.php (/catalog/includes/fec/) NOT checkout_payment.php to get it to work !!

 

Hope that helps someone

 

Ronnie

Share this post


Link to post
Share on other sites

if you want to choose your favorite payment-method through your admin-controlpanel, do the following steps:

 

 

inser this into your database with phpmyadmin

INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )

VALUES (

'1588', 'Preselected Paymentmethod', 'STANDARD_PAYMENT', 'moneyorder', 'Choose your preselected Paymentmethod in checkout_payment.php', '7', '15', '2010-01-12 16:09:05', '2010-01-12 16:09:05', NULL , 'tep_cfg_select_option(array(''moneyorder'', ''cod'', ''paypal_standard'', ''authorizenet_cc_aim'', ''authorizenet_cc_sim'', ''cc'', ''chronopay'', ''ipayment_cc'', ''nochex'', ''paypal_express'', ''paypal_standard'', ''paypal_uk_direct'', ''paypal_uk_express'', ''psigate'', ''secpay'', ''worldpay_junior'' ),'

);

 

note: you can add more paymentmethods if you need/want. just type in the name of the php-file from catalog/includes/modules/payment.

 

open checkout_payment.php

 

ADD THIS:

// Select Credit Card as default payment method if none selected

if (!isset($payment)) {

$payment = STANDARD_PAYMENT;

}

 

AFER THIS:

// load all enabled payment modules

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment;

 

FIND THIS:

echo tep_draw_radio_field('payment', $selection[$i]['id']);

 

REPLACE WITH THIS:

echo tep_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $payment));

 

FINISHED!

 

now you can change your favorite paymentmethod in "Configuration -> Shippingoptions"

 

hope this helps.

 

special thanks to monika and zazu :)

Share this post


Link to post
Share on other sites

×