jwhysleep Posted January 30, 2009 Share Posted January 30, 2009 i put a required field in the checkout_shipping.php i have put the code into the top and also have the code in the form_check.js.php no ,atter what when i click on continue it still goes to the next page even though i havnt typed anything into the field! Im using the contribution "Customer required fields" need this done im stuck heres the code! ///////////////////////////////////this displays the field on the page//// <?php echo tep_get_extra_fields($cInfo->customers_id,$languages_id)?> ///////////////////////////top of page tep_db_query("delete from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id=" . $customer_id); $extra_fields_query = tep_db_query("select ce.fields_id from " . TABLE_EXTRA_FIELDS . " ce where ce.fields_status=1 "); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ $sql_data_array = array('customers_id' => $customer_id, 'fields_id' => $extra_fields['fields_id'], 'value' => $HTTP_POST_VARS['fields_' . $extra_fields['fields_id']]); tep_db_perform(TABLE_CUSTOMERS_TO_EXTRA_FIELDS, $sql_data_array); } ///////////////////////////////////////////////// ////////////////////at top require('includes/form_check.js.php'); //////////////// ///////////////////////////////////////////// form_check.js.php <?php $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ $string_error=sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']);?> check_input("<?php echo 'fields_' . $extra_fields['fields_id']?>", <?php echo $extra_fields['fields_size']-1;?>, "<?php echo $string_error; ?>"); <?php }?> ///////////////////////////////////////// I have even tried other code javascript and php required fields and it still continues to go to the next page but this needs to be mandatory before going to the next step Quote Link to comment https://forums.phpfreaks.com/topic/143064-going-crazy-oscommerce/ Share on other sites More sharing options...
phparray Posted January 30, 2009 Share Posted January 30, 2009 osCommerce is practically abandon wear at this point. I'd recommend something that has a more active community like zen-cart. http://www.zen-cart.com Quote Link to comment https://forums.phpfreaks.com/topic/143064-going-crazy-oscommerce/#findComment-750308 Share on other sites More sharing options...
jwhysleep Posted January 30, 2009 Author Share Posted January 30, 2009 osCommerce is practically abandon wear at this point. I'd recommend something that has a more active community like zen-cart. http://www.zen-cart.com i HAVE SPENT 3 MONTHS CUSTOMIZING THE WAY the client likes to go back now! Quote Link to comment https://forums.phpfreaks.com/topic/143064-going-crazy-oscommerce/#findComment-750385 Share on other sites More sharing options...
jwhysleep Posted January 30, 2009 Author Share Posted January 30, 2009 Can I use something simular to this? <?php if (!isset($_POST['customers_id'])){ echo tep_get_extra_fields($cInfo->customers_id,$languages_id); } else { //it was filled out } ?> Quote Link to comment https://forums.phpfreaks.com/topic/143064-going-crazy-oscommerce/#findComment-750728 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.