Page 1 of 1

register account form at login page

Posted: Sat Nov 13, 2010 5:22 pm
by afendio
Hi, anybody can help me how to make the register account form at the same page with login page? i tried find the solution but not found yet.

Re: register account form at login page

Posted: Sat Nov 13, 2010 5:28 pm
by afendio
I'm use Opencart v1.48b

Re: register account form at login page

Posted: Sun Nov 14, 2010 2:51 am
by cartpro
you can post to index.php?account/create but you need to tweak the module to get around the address validation. Best thing would be to duplicate the account/create module and customize for your requirements.

Re: register account form at login page

Posted: Mon Nov 15, 2010 10:13 am
by afendio
I tried but not working.

Re: register account form at login page

Posted: Mon Nov 15, 2010 10:30 am
by afendio
this is my code for ..\catalog\view\theme\default2\template\account\login.tpl
but not working for the create account form. login form no problem. any help? thanks

Code: Select all

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
  <div class="middle">
    <?php if ($success) { ?>
    <div class="success"><?php echo $success; ?></div>
    <?php } ?>
    <?php if ($error) { ?>
    <div class="warning"><?php echo $error; ?></div>
    <?php } ?>
    <div style="margin-bottom: 10px; display: inline-block; width: 100%;">
      <div style="float: left; display: inline-block; width: 49%;"><b style="margin-bottom: 2px; display: block;">
      <?php echo $text_i_am_new_customer; ?></b>
      
        <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; min-height: 150px;">
        
        
<?php include "catalog/view/theme/default2/template/account/create.tpl";?>

          
        </div>
        
        
      </div>
      <div style="float: right; display: inline-block; width: 49%;"><b style="margin-bottom: 2px; display: block;"><?php echo $text_returning_customer; ?></b>
        <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; min-height: 150px;">
          <form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="login">
            <?php echo $text_i_am_returning_customer; ?><br />
            <br />
            <b><?php echo $entry_email; ?>
            <input type="text" name="email" />
            <br />

            <b><?php echo $entry_password; ?>  &nbsp;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="password" name="password" />
            <br />              <br />
            
            

            
            
 <div style="text-align: left;"><a onclick="$('#login').submit();" class="button"><span>
 <?php echo $button_login; ?></span></a></div>
            <?php if ($redirect) { ?>
            <input type="hidden" name="redirect" value="<?php echo str_replace('&', '&', $redirect); ?>" />
            <?php } ?>
            
            <a href="<?php echo str_replace('&', '&', $forgotten); ?>"><?php echo $text_forgotten_password; ?></a>
            <br />
            
            
          </form>
        </div>
      </div>
    </div>
  </div>
  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>

</div>
<script type="text/javascript"><!--
$('#login input').keydown(function(e) {
    if (e.keyCode == 13) {
        $('#login').submit();
    }
});
//--></script>
<?php echo $footer; ?> 

Re: register account form at login page

Posted: Mon Nov 15, 2010 10:32 am
by afendio
this is my code for ..\catalog\view\theme\default2\template\account\create.tpl

Code: Select all

    <?php if ($error_warning) { ?>
    <div class="warning"><?php echo $error_warning; ?></div>
    <?php } ?>
    
    
    <form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="create">

        <table>
          <tr>
            <td width="150"> <?php echo $entry_firstname; ?></td>
            <td><input type="text" name="firstname" value="<?php echo $firstname; ?>" />
            <span class="required"> *</span>
              <?php if ($error_firstname) { ?>
              <span class="error"><?php echo $error_firstname; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><?php echo $entry_lastname; ?></td>
            <td><input type="text" name="lastname" value="<?php echo $lastname; ?>" />
                      <span class="required"> *</span>
              <?php if ($error_lastname) { ?>
              <span class="error"><?php echo $error_lastname; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><?php echo $entry_email; ?></td>
            <td><input type="text" name="email" value="<?php echo $email; ?>" />
                      <span class="required"> *</span>
              <?php if ($error_email) { ?>
              <span class="error"><?php echo $error_email; ?></span>
              <?php } ?></td>
          </tr>
           <tr>
            <td width="150"><?php echo $entry_password; ?></td>
            <td><input type="password" name="password" value="<?php echo $password; ?>" />
                      <span class="required"> *</span>
              <?php if ($error_password) { ?>
              <span class="error"><?php echo $error_password; ?></span>
              <?php } ?></td>
          </tr>
           <tr>
            <td> <?php echo $entry_confirm; ?></td>
            <td><input type="password" name="confirm" value="<?php echo $confirm; ?>" />
                      <span class="required"> *</span>
              <?php if ($error_confirm) { ?>
              <span class="error"><?php echo $error_confirm; ?></span>
              <?php } ?></td>
          </tr>
          
           <tr>
            <td align="left"><br />
            <a onclick="$('#create').submit();" class="button">
            <span><?php echo $button_register; ?></span>
            </a>
                        <br /><br />
      
            </td>
          </tr>
 
         <input type="hidden" name="country_id" value="Malaysia"/>
         <input type="hidden" name="zone_id" value="Sabah"/>
         <input type="hidden" name="newsletter" value="1"/>
         <input type="hidden" name="telephone" value="<?php echo $telephone; ?>" />
         <input type="hidden" name="fax" value="<?php echo $fax; ?>" />
         <input type="hidden" name="company" value="<?php echo $company; ?>" />
         <input type="hidden" name="address_1" value="<?php echo $address_1; ?>" />
         <input type="hidden" name="address_2" value="<?php echo $address_2; ?>" />
         <input type="hidden" name="city" value="<?php echo $city; ?>" />
         <input type="hidden" name="postcode" value="<?php echo $postcode; ?>" />

        </table>
      
    </form>
    
    
    <script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/create/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//-->
</script>

Re: register account form at login page

Posted: Mon Nov 15, 2010 10:36 am
by afendio
i think there is need to modify code in (..\catalog\controller\account\login.php) or (..\catalog\controller\account\create.php) but i dont know how to. any body can help me how to make it working? thanks.

Re: register account form at login page

Posted: Mon Nov 15, 2010 10:37 am
by afendio
cartpro wrote:you can post to index.php?account/create but you need to tweak the module to get around the address validation. Best thing would be to duplicate the account/create module and customize for your requirements.
how to do that?

Re: register account form at login page

Posted: Tue Nov 30, 2010 1:36 pm
by afendio
can anybody help me please?
is that possible to make "create account form" & "login form" at the same page as picture attached above?

Re: register account form at login page

Posted: Thu Dec 02, 2010 5:53 am
by openmycart.com
You can find it at: http://www.opencart.com/index.php?route ... ion_id=945

Image
Image
Image

Now Your already helped :)

Re: register account form at login page

Posted: Wed May 18, 2011 5:40 am
by efred1
Afendio, liked your modification of the simple account login and combination of the two pages into one. I have also tried to rid my customer registration form page of the unnecessary fields that are not needed for digital download stores. All was working wonderfully well then the cart stopped working for some reason. Did you ever achieve your dream modification, if so where can i get it. thanks efred1