netguru Posted February 9, 2003 Share Posted February 9, 2003 I got a question here. If I disable all the payments, It seems that I still can check out withuot payment method. For CVS 2.2, in checkout_confirmation.php, I check out this part of code: if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } Under no payment method condition, $payment_modules will return as object(payment)(2) { ["modules"]=> NULL ["selected_module"]=> NULL } As such, the following condition if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) will return false, and it will allow you to checkout without any payment method. Is that kind of design or my mistake? Thank you! Link to comment Share on other sites More sharing options...
kagg Posted February 9, 2003 Share Posted February 9, 2003 Hi, You are right. If you disable all the payment methods from admin, that already implies checkout without payment. :) kagg Link to comment Share on other sites More sharing options...
netguru Posted February 10, 2003 Author Share Posted February 10, 2003 Illogical Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.