Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Form validation


rayge

Recommended Posts

Posted

I need to have a checkbox op the checkout_confirmation.php page with validation that it needs to have been checked in oprder to complete the checkout process. I notice it posts to checkout_process.php

 

Can i have it post to itself then if it validates then Iniclude the process page? would there be any issues with that?

Posted

It would be easier if it was on checkout_shipping.php or checkout_payment.php but theoretically you could have something like this on checkout_process.php:

 

 if (!isset($_POST['checkbox'])) {
  tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'error_message=' . ERROR_NO_CHECKBOX_SELECTED, 'SSL'));
}

 

I don't think checkout_confirmation.php has an error stack but you could add it in. I recommend playing with this a lot on a testing server before going live with it.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Posted

I had tried somthing like that and it looses the CC info and gets passed back to the payment info instead. So,

 

I decided to use the javascript checking on it only and that did the trick without having to figure out how to pass it back and forth.. it will do for now :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...