Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Defining minimum length


losttime

Recommended Posts

I want to copy the "First Name" field and make it a "User Name".

 

So far, so good, but I cannot seem to find where the ENTRY_FIRST_NAME_MIN_LENGTH variable (or any other *_MIN_LENGTH variable) is defined.

 

It's called in create_account.php (and other places). Do you know where it's defined ... or how?

Link to comment
Share on other sites

includes/languages/english.php

 

But get yourself a good plain text editor with a 'Find In Files' feature like Text Pad. Keep a copy of your site on your computer and when you need to find anything just use the Find In Files feature.

 

Vger

Link to comment
Share on other sites

includes/languages/english.php

 

But get yourself a good plain text editor with a 'Find In Files' feature like Text Pad. Keep a copy of your site on your computer and when you need to find anything just use the Find In Files feature.

 

Vger

 

Thank you for helping me out.

 

I do use Text Pad (what a wonderful tool for writing/viewing code!!!!) and I've searched includes/languages/english.php a few times now (that's how I found ENTRY_FIRST_NAME).

 

But I can't seem to find ENTRY_FIRST_NAME_MIN_LENGTH.

 

I see that it's called, but not defined.

 

Is it defined some other way than the common define('ALL_CAPS_VARIABLE', 'This is the definition')?

 

-David

Link to comment
Share on other sites

If you're looking to change the minimum length setting, that's in the admin panel in Configuration.

Thank you, but what I am trying to do is add another variable with exactly the same properties as ENTRY_FIRST_NAME_MIN_LENGTH.

 

I want to find where it's defined, copy it, and change the name to something else so the new variable can be called just like the original one.

 

ENTRY_FIRST_NAME_MIN_LENGTH must be defined in some piece of code, or maybe in a database. Does anyone know where to find it?

 

- David

Link to comment
Share on other sites

Using Text Pad:

 

account_edit.php(42): if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {

address_book_process.php(63): if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {

checkout_payment_address.php(62): if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {

checkout_shipping_address.php(75): if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {

create_account.php(67): if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {

admin\customers.php(45): if (strlen($customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {

admin\customers.php(264): if (customers_firstname == "" || customers_firstname.length < <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>) {

admin\includes\languages\english.php(134): define('JS_FIRST_NAME', '* The \'First Name\' entry must have at least ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' characters.\n');

admin\includes\languages\english.php(159): define('ENTRY_FIRST_NAME_ERROR', ' <span class="errorText">min ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' chars</span>');

admin\includes\languages\espanol.php(133): define('JS_FIRST_NAME', '* El \'Nombre\' debe tener al menos ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' letras.\n');

admin\includes\languages\espanol.php(158): define('ENTRY_FIRST_NAME_ERROR', ' <span class="errorText">min ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' letras</span>');

admin\includes\languages\german.php(133): define('JS_FIRST_NAME', '* Der \'Vorname\' muss mindestens aus ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' Zeichen bestehen.\n');

admin\includes\languages\german.php(158): define('ENTRY_FIRST_NAME_ERROR', ' <span class="errorText">mindestens ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' Buchstaben</span>');

includes\form_check.js.php(107): check_input("firstname", <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>, "<?php echo ENTRY_FIRST_NAME_ERROR; ?>");

includes\languages\english.php(171): define('ENTRY_FIRST_NAME_ERROR', 'Your First Name must contain a minimum of ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' characters.');

includes\languages\espanol.php(169): define('ENTRY_FIRST_NAME_ERROR', 'Su Nombre debe tener al menos ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' letras.');

includes\languages\german.php(169): define('ENTRY_FIRST_NAME_ERROR', 'Der Vorname sollte mindestens ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' Zeichen enthalten.');

 

It's also in the database in the configuration table.

 

Vger

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...