Jump to content
Latest News: (loading..)

Membership form issue

Recommended Posts

Depending on the field, you may be able to make it compulsory in the Admin area.  If not there, you make it compulsory in the page that processes the form. 

Here's the code that makes the email compulsory in create_account.php (from but likely the same in all 2.3.x): 

    if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
      $error = true;

      $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);
    } elseif (tep_validate_email($email_address) == false) {
      $error = true;

      $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
    } else {
      $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
      $check_email = tep_db_fetch_array($check_email_query);
      if ($check_email['total'] > 0) {
        $error = true;

        $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);

Note that the ENTRY_EMAIL_ADDRESS_MIN_LENGTH is something that is set in the Admin. 

To make something that is currently compulsory so that it is optional, you'd have to make code like this not run.  Note that it would be a very bad idea to make the email address not compulsory. 

It's also marked as required by translated text: 

 . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); 

And from the language file, english.php :


If you delete the * from that, it will no longer display the requirement span. 

Always backup before making changes.

Share this post

Link to post
Share on other sites

1)the * didnot appear even though set in

define('ENTRY_AGREE', 'agree:','*');


Should be elsewhere to define this

$messageStack->add('create_account', ENTRY_AGREEMENT_ERROR);


2) error didnot popup instead of font_style_main error

Share this post

Link to post
Share on other sites
8 hours ago, hkgenesis said:

can the normal 2.3.4 version change to bootstrap version?

No. You have to back up your database, install the new BS version of osCommerce in another directory, import a copy of your database (and make the necessary adjustments and changes). You will now have a clean installation of osCommerve BS with your database. Now, you can apply any add-ons and/or changes, plus any style changes to make the new store look and feel like your old store.


If you are running the "official" osC 2.3.4 or download, your installation is obsolete! Get the latest community-supported responsive "Edge" release here

Share this post

Link to post
Share on other sites

we want to  embeded a mp4 video into the 

define php include file

Is there any suggested way?

<video width="320" height="240" controls autoplay>
  <source src="video.mp4" type="video/mp4">

We tried, but no luck

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now