Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add login box to STS template


DonnaNJ

Recommended Posts

Hello

 

I've installed the Login box contribution which puts a nice login box on the main page.

 

However, I'm now using STS (Simple Template System) to redesign the whole layout ... and I don't know where to stick the call to login.php

 

How to a make a new variable for STS ?

 

Or can I still stick it on column_right.php .. which I did - but doesnt' seem to work.

 

I obviously can't stick it in the sts_template.html file - since it's html.

 

So how can I so this.

 

I tried defining another variable $login in the sts_display..something file.

 

I didn't get an error but it didn't work either ! LOL.

 

Thanks

 

Donna

 

:huh:

Link to comment
Share on other sites

DonnaNJ,

 

instead of adding a login box contribution, I thought about a more direct solution by adding a login html form to STS template and passing the email and password form variables to login.php

 

login html form:

<form action="http://www.yourdomain.com/catalog/login.php" method="post" name="process" >
Login:<input type="text" name="email_address"/><br/>
Password:<input type="password" name="password"/><br/>
<a class="anohref" id="sign_in" onclick="process.submit()">Sign in</a>
</form>

 

when you click Sign in , it takes you to the login page with email address box retaining the submitted email address and the password box empty. It looks like the form is not passing the two variables to process. Perhaps someone can tell why? I will be happy to turn this into a contribution if we can just get the variables to pass to login.php correctly

Link to comment
Share on other sites

oh I see why it did not pass, I needed to append ?action=process to login.php . It works like a charm now, here is the revised code, give this a try.

 

It is a box or div with email & password form input, signin, signup, and forgot password links, and also the STS $logoff variable. Do you think this is worthwhile to anyone else to turn it into a contribution ?

<!--  add this to your sts template file. --->
<div id="login">
<form action="http://pathtoyourstore/login.php?action=process" method="post" name="login" >
Login:<input type="text" name="email_address"/><br/>
Password:<input type="password" name="password"/><br/>
<a id="sign_in" onclick="login.submit()">Sign in</a>
<a id="sign_up" href="/create_account.php">Sign up</a>
<a id="forgot" href="/password_forgotten.php">Forgot?</a><br/>
$logoff
</form>
</div> <!-- end of login -->

Link to comment
Share on other sites

oh I see why it did not pass, I needed to append ?action=process to login.php . It works like a charm now, here is the revised code, give this a try.

 

It is a box or div with email & password form input, signin, signup, and forgot password links, and also the STS $logoff variable. Do you think this is worthwhile to anyone else to turn it into a contribution ?

<!--  add this to your sts template file. --->
<div id="login">
<form action="http://pathtoyourstore/login.php?action=process" method="post" name="login" >
Login:<input type="text" name="email_address"/><br/>
Password:<input type="password" name="password"/><br/>
<a id="sign_in" onclick="login.submit()">Sign in</a>
<a id="sign_up" href="/create_account.php">Sign up</a>
<a id="forgot" href="/password_forgotten.php">Forgot?</a><br/>
$logoff
</form>
</div> <!-- end of login -->

 

 

Thanks !

 

Looks great ! Works too ! Thanks

 

http://www.dbkwebdevelopment.com/3CFinal/

 

 

Donna

Link to comment
Share on other sites

Thanks !

 

Looks great ! Works too ! Thanks

 

http://www.dbkwebdevelopment.com/3CFinal/

Donna

 

looks great. Should I turn it into a contribution?

 

Have a blessed day.

Link to comment
Share on other sites

yes u should. i am sure that newbies like me want that.

 

click on the link under mu signature for STS login contribution.....take care

Link to comment
Share on other sites

  • 1 year later...
  • 11 months later...
Hmm, Having trouble with this.

 

The 'sign in' text doesn't appear to be working. When I hover over it - it changes like a link, but I can't click it.

 

Any idea why?

 

My 'sign in' text appears as just text and not clickable :/, here is my code:

<!-- add this to your sts template file. --->
<div id="login">
 <div class="login_head">Login Now </div>
<form action="http://www.scottsdogtraining.com/catalog/login.php?action=process" method="post" name="login" >
<div class="login_text">Username</div><br /><input type="text" name="email_address" class="login_textbox" /><p />
<div class="login_text">Password</div><br /><input type="password" name="password" class="login_textbox" /><br />
<a id="sign_in" onclick="login.submit()">Sign in</a>
<div align="left"><a id="sign_up" href="create_account.php" class="more">Sign up</a></div>
$logoff
</form>
</div> <!-- end of login -->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...