Hi.
I am doing mods for 2.2 for a store. I have added B2B suite, french module (although they have nothing to do with the problem I don't think):
My browser renders no page for create_account.php, and when I checked the code it appears to be producing the required script from form_check.js.php until near the end. If I comment out the remaining lines it works... but surely I am then missing some of the length checking script?
Anyway, the source of create_account.php as rendered through the browser is:
....(first section deleted)....
function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password_current = form.elements[field_name_1].value;
var password_new = form.elements[field_name_2].value;
var password_confirmation = form.elements[field_name_3].value;
if (password_current == '' || password_current.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password_new == '' || password_new.length < field_size) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
} else if (password_new != password_confirmation) {
error_message = error_message + "* " + message_3 + "\n";
error = true;
}
}
}
function check_form(form_name) {
if (submitted == true) {
alert("Ce formulaire a déjà été soumis. Veuillez cliquer sur OK et attendez que le processus se termine.");
return false;
}
error = false;
form = form_name;
error_message = "Erreur dans le traitement de votre formulaire !\nVeuillez faire les corrections suivantes :\n\n";
and nothing more.... hence the blank page.
whereas the script from form_check.js.php reads (starting from the same point in the file:
function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password_current = form.elements[field_name_1].value;
var password_new = form.elements[field_name_2].value;
var password_confirmation = form.elements[field_name_3].value;
if (password_current == '' || password_current.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password_new == '' || password_new.length < field_size) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
} else if (password_new != password_confirmation) {
error_message = error_message + "* " + message_3 + "\n";
error = true;
}
}
}
function check_form(form_name) {
if (submitted == true) {
alert("<?php echo JS_ERROR_SUBMITTED; ?>");
return false;
}
error = false;
form = form_name;
error_message = "<?php echo JS_ERROR; ?>";
<?php if (ACCOUNT_GENDER == 'true') echo ' check_radio("gender", "' . tep_decode_html_entities(ENTRY_GENDER_ERROR) . '");' . "\n"; ?>
check_input("firstname", <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_FIRST_NAME_ERROR); ?>");
check_input("lastname", <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_LAST_NAME_ERROR); ?>");
<?php if (ACCOUNT_DOB == 'true') echo ' check_input("dob", ' . ENTRY_DOB_MIN_LENGTH . ', "' . tep_decode_html_entities(ENTRY_DATE_OF_BIRTH_ERROR ) . '");' . "\n"; ?>
check_input("email_address", <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_EMAIL_ADDRESS_ERROR ); ?>");
check_input("street_address", <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_STREET_ADDRESS_ERRO R); ?>");
check_input("postcode", <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_POST_CODE_ERROR); ?>");
check_input("city", <?php echo ENTRY_CITY_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_CITY_ERROR); ?>");
<?php if (ACCOUNT_STATE == 'true') echo ' check_input("state", ' . ENTRY_STATE_MIN_LENGTH . ', "' . tep_decode_html_entities(ENTRY_STATE_ERROR) . '");' . "\n"; ?>
check_select("country", "", "<?php echo tep_decode_html_entities(ENTRY_COUNTRY_ERROR); ?>");
check_input("telephone", <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_TELEPHONE_NUMBER_ER ROR); ?>");
check_password("password", "confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_ERROR); ?>", "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_ERROR_NOT_ MATCHING); ?>");
check_password_new("password_current", "password_new", "password_confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_ERROR); ?>", "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_NEW_ERROR) ; ?>", "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_NEW_ERROR_ NOT_MATCHING); ?>");
if (error == true) {
alert(error_message);
return false;
} else {
submitted = true;
return true;
}
}
//--></SCRIPT>
I am sure its the position of the php tags, but i do not remember changing this file in either of the contributions i have added so I am confused as to how it can be wrong - and not being experienced in PHP do not see the error.
I would REALLY be VERY appreciative to any help from any direction.
My apologies also for such a verbose post.
Thank you for your time.
James.





LinkBack URL
About LinkBacks






Bookmarks