Jump to content

Going Crazy osCommerce


jwhysleep

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.