An Easier Way to Create an Account

Make it a bit less challenging to create an account. This adds an email entry field adjacent to the ‘create account’ button. When the user fills in an email and clicks the submit button, they go as usual to create_account.php, but the email field is filled in. If they enter nothing on login.php, they still proceed to create_account.php and fill in the form as normal. It’s kind of like Amazon, sort of.

  1. Place the following on login.php : (replaces the submit button)

    <?php
    echo tep_draw_form('email_login', tep_href_link(FILENAME_CREATE_ACCOUNT, 'action=post', 'SSL'));
    echo '<p class="right">'.tep_draw_input_field('email_login', 'enter email address'). tep_draw_separator('pixel_trans.gif', '10', '10').tep_image_submit('', '', 'value="Create Account"');
    echo '</p></form>';
    ?>

  2. Place the following on create_account.php (replaces the email field)

    <?php
    $email_login = $HTTP_POST_VARS['email_login'];
    echo '<p>'.ENTRY_EMAIL_ADDRESS.'<br/>'.tep_draw_input_field('email_address', $email_login) . '&nbsp;' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': '');
    ?>

posted on the OSCommerce forum under ‘Tips and Tricks’:
Create Account Variation