lizard_boy Posted June 7, 2004 Share Posted June 7, 2004 I added the CVV contribution, it seems to be working well, but I'm having trouble making it mandatory at checkout. On the screen where the customer enters their credit card info there is now a field for them to enter the 3-digit CVV number from the back of their card. I'd like this to be mandatory since right now if you leave it blank the order still processes fine. I went into the admin section and set the minimum value to 3, but this doesn't seem to have any affect. Thanks. Radio Shack: "You've got questions, we've got batteries." Link to comment Share on other sites More sharing options...
vasttech Posted June 7, 2004 Share Posted June 7, 2004 Mind you this is untested, but it should work. Add a line to your includes/form_check.js.php file that looks something like this: check_input("cvv", <?php echo ENTRY_CVV_MIN_LENGTH; ?>, "<?php echo ENTRY_CVV_ERROR; ?>"); The above code assumes that cvv is the name of the form field containing the CVV; ENTRY_CVV_MIN_LENGTH is the name of the configuration variable being defined, and ENTRY_CVV_ERROR should be some text that states the error, it should be defined in application_top.php or another file that is included with your page. Hope that helps. Almost forgot, you will need to put an if statement in there to check to make sure that the field is in that form. Otherwise you will get errors when you go to a page such as create_account.php since that field is not there. osCommerce Knowledge Base osCommerce Documentation Contributions Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.