trembita Posted June 6, 2007 Posted June 6, 2007 I want to disable payment step while checkout. How can I do this?
Guest Posted June 6, 2007 Posted June 6, 2007 in chekout_shipping.php change in tep_redirect() FILENAME_CHECKOUT_PAYMENT to FILENAME_CHECKOUT_CONFIRMATION (few fields), and in checkout_process.php delete all checking payment session.
trembita Posted June 6, 2007 Author Posted June 6, 2007 oops, I must be stupid. OK I got the first step find in chekout_shipping.php and change in tep_redirect() FILENAME_CHECKOUT_PAYMENT to FILENAME_CHECKOUT_CONFIRMATION But second step is something unclear for me. Fo exmple this piece of code: // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT)); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } if (!tep_session_is_registered('sendto')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } if ( (tep_not_null(MODULE_PAYMENT_INSTALLED)) && (!tep_session_is_registered('payment')) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } what should I delete?
Guest Posted June 6, 2007 Posted June 6, 2007 if ( (tep_not_null(MODULE_PAYMENT_INSTALLED)) && (!tep_session_is_registered('payment')) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } I forgot. You must delete it in checkout_confirmation.php too
trembita Posted June 18, 2007 Author Posted June 18, 2007 after I made all changes I got this Warning: htmlspecialchars() expects parameter 1 to be string, array given in /var/www/xxx/xxx.com./includes/functions/general.php on line 46 I tried to substitute this 3 files with the original ones but this warning message still is on the checkout_confirmation page. How to fix this?
Guest Posted January 11, 2008 Posted January 11, 2008 I forgot. You must delete it in checkout_confirmation.php too I wanted to thank you for contributing your input on this tough-to-find "how-to". The configuration of catalog/checkout_shipping.php was simple. What I did on the second step was to completely delete both "if" statement data in the following areas of catalog/checkout_process.php: // if the customer is not logged on, redirect them to the login page // avoid hack attempts during the checkout procedure by checking the internal cartID I then commented-out the following entries further down this file: *Note the // are used to comment-out. In the original file, the // are not placed as shown below. This is how my file looks. // load selected payment module // require(DIR_WS_CLASSES . 'payment.php'); // $payment_modules = new payment($payment); // load the selected shipping module // require(DIR_WS_CLASSES . 'shipping.php'); // $shipping_modules = new shipping($shipping); I don't know if this last step was necessary, but I did it as a safe-guard. Regards, Erick
Guest Posted January 11, 2008 Posted January 11, 2008 Why not just simple do the following? Open checkout_payment.php Find the following code require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT); Above that code add the following // skip if only 1 payment method available if (tep_count_payment_modules() == 1) { if (!tep_session_is_registered('payment')) tep_session_register('payment'); tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL')); } If you are NOT offering a payment option then change the 1 to 0 and it should work the same.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.