Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Setting a default payment


dreamscape

Recommended Posts

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...