PDA

View Full Version : Credit Class & Gift Voucher



michael_s
02-26-2008, 05:31 PM
Small fix to an issue when credit balance covers all and you have shipping included, but you still get an error where the system wants you to choose payment method even if it's not supposed to.

First change following in checkout_confirmation.php and checkout_process.php:

if ($credit_covers) $payment=''; //ICW added for CREDIT CLASS

to:

if ($credit_covers) $payment='credit_covers'; //ICW added for CREDIT CLASS

And to includes/classes/payment.php:

if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED)) {

to:

if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED) && !$module == 'credit_covers') {

That's it! Now if credit covers whole order, it won't try to load any payment module. Didn't want to use $payment as an empty string to keep better track of changes.

Included a text file with this information.

More... (http://addons.oscommerce.com/info/282)