etzeppy Posted January 26, 2010 Share Posted January 26, 2010 On occasion a customer will inadvertently select the check/money order method of payment when they intend to pay by credit card. The credit cart input fields are still available for input on the payment screen. The customer can input their credit card data and never notice that the wrong payment type was selected. I would like to either: 1) add an error check in the check/money order payment module and return an error if a credit card number has been input or 2) disable credit card entry fields if check/money order is selected I am looking for input on which of those two would easier to do and where I might look for ideas on how to implement. Thanks Quote Link to comment Share on other sites More sharing options...
web-project Posted January 27, 2010 Share Posted January 27, 2010 (edited) On occasion a customer will inadvertently select the check/money order method of payment when they intend to pay by credit card. you can create stupid proof system, as a customer can enter wrong address too :rolleyes::) No connection between two modules, but you can put the message in red colour to ask customers to select right payment method. Edited January 27, 2010 by web-project Quote Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
etzeppy Posted January 27, 2010 Author Share Posted January 27, 2010 you can create stupid proof system, as a customer can enter wrong address too :rolleyes::) point taken. They do seem to find new and interesting ways to defeat logic. This check payment issue has happened several times in past few months, which made me think it was a pretty easy mistake to make. Maybe a little red text will do it. I've added red text in other areas of the checkout process. For kicks, I borrowed a little code from the CC module to test if the card number length was >0 but it's not really working. If someone enters card info, it picks that up with no problem. However, if no card info is entered at all and the field is never "touched", the result does not seem to be 0. I can't quite figure that out.... Quote Link to comment Share on other sites More sharing options...
etzeppy Posted January 28, 2010 Author Share Posted January 28, 2010 I did get something working. I borrowed some of the error checking code from the standard CC module and tweaked it a bit. I'm not sure if I am going to keep it, but it does work. In /includes/modules/moneyorder.php FIND: function javascript_validation() { return false; REPLACE WITH: function javascript_validation() { $js = ' if (payment_value == "' . $this->code . '") {' . "\n" . ' var cc_number = document.checkout_payment.cc_number.value;' . "\n" . ' if (cc_number.length > ' . '0' . ') {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_MONEYORDER_TEXT_JS_CC_NUMBER . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' }' . "\n"; return $js; MODULE_PAYMENT_MONEYORDER_TEXT_JS_CC_NUMBER is the text you want displayed in the error pop-up, which I added to moneyorder.php language file. define('MODULE_PAYMENT_MONEYORDER_TEXT_JS_CC_NUMBER', 'A Credit Card number should not be entered for this payment type. Please verify your payment method selection or remove the credit card number from the payment form.\n'); The code tests the credit card number entry field on the payment page and makes sure it is blank if the check/money order payment method has been selected. Quote Link to comment Share on other sites More sharing options...
dynamoeffects Posted January 28, 2010 Share Posted January 28, 2010 This might be a simpler solution: http://addons.oscommerce.com/info/5285 Quote Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail. Link to comment Share on other sites More sharing options...
etzeppy Posted January 28, 2010 Author Share Posted January 28, 2010 This might be a simpler solution: http://addons.oscommerce.com/info/5285 I like that. I wish I had found it years ago. Thanks for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.