Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

checkout comment required


rizrock

Recommended Posts

Hi again,

 

another way of retrieving required information from the customer in my astrology shop would be to make the checkout comment text box "required": with a minimum length of 20 digits.

 

Any help is appreciated.

 

thanks a lot

Link to comment
Share on other sites

I got a good hint on the german board.

 

this is it: comments box allows no less than 50 digits.

____________________________________________________

 

in checkout_confirmation.php insert:

//-- Check the comments field
   if (strlen($HTTP_POST_VARS['comments']) < 50) {
     tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_CHECKOUT_COMMENTS_EMPTY), 'SSL', true, false));
   }

 

in includes/languages/german.php insert:

define('ERROR_CHECKOUT_COMMENTS_EMPTY', 'please enter your blablabla text here');

____________________________________________________

 

however... simple as that.

Link to comment
Share on other sites

  • 3 years later...
I got a good hint on the german board.

 

this is it: comments box allows no less than 50 digits.

____________________________________________________

 

in checkout_confirmation.php insert:

//-- Check the comments field
   if (strlen($HTTP_POST_VARS['comments']) < 50) {
     tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_CHECKOUT_COMMENTS_EMPTY), 'SSL', true, false));
   }

 

in includes/languages/german.php insert:

define('ERROR_CHECKOUT_COMMENTS_EMPTY', 'please enter your blablabla text here');

____________________________________________________

 

however... simple as that.

 

Hi,

 

I tried this and had some problems. I was able to check out without comments, but I did get an error at the bottom of the confirmation page. Is there more to this than shown above, like perhaps placement ofthe code in the confirmation file? I tried putting it at the end.

 

Thanks,

 

Bruce

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...