Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Anyone know how to put account login on main index


Assailant

Recommended Posts

Posted

hey ally thanks for your reply, I already used the login box, but I just need the basic login stuff for the main index page. not sure if theres a contribution for it or if someone has a script to do this

Posted

Try this:

 

Go to catalog/index.php. Find the following code:

          <tr>
           <td class="main"><?php echo TEXT_MAIN;  ?>
</td>
         </tr>

 

Add the following below this (or wherever you want it):

 

  <tr>
           <td class="main"> <?php require(DIR_WS_BOXES . 'loginbox.php'); ?>
</td>
         </tr>

 

And it will only show on your front page. Works for me anyway :)

Posted

anyway to have it appear on the languages/english/index.php ?

 

I want it in the center, not on one of the columns, thanks for your replies, much appreciated :)

Posted

Sorry to be a pain- just re-read your last comment and my suggestion will make it show in the centre - just underneath your intro text.

 

Does this make sense - or am I missing something!?!?!?! :blink:

Posted

I'll try to help......put this following code in your greeting text page in english.php

 

 

<td height="133" valign="top"><form name="login" method="post" action="http://yourdomain.com/login.php?action=process&osCsid=5be7f04290a97543bf529884463f068f">

? ? ? ? ? <div align="center">

? ? ? ? ? ? <input type="hidden" name="osCsid" value="5be7f04290a97543bf529884463f068f" />

? ? ? ? ? ? <br>

? ? ? ? ? ? E-Mail address:<br>

? ? ? ? ? ? <input type="text" name="email_address" maxlength="96" size="20" value="">

? ? ? ? ? ? <br>

? ? ? ? ? ? Password:<br>

? ? ? ? ? ? <input type="password" name="password" maxlength="40" size="20" value="">

? ? ? ? ? ? <br>

? ? ? ? ? ? <input type="image" src="includes/languages/english/images/buttons/button_login.gif?osCsid=5be7f04290a97543bf529884463f068f" border="0" alt="Login" title="Member Login ">

? ? ? ? ? </div>

? ? ? ? </form></td>

 

 

this should do it then..... ;) :) ..if it doesn't work....oopsy :D

OS-commerce is great, but with other magical contributions, that is just so "COOL"!

Posted

hehe thanks guys, getting close, im gonna try to edit it to get the look I want, but its hard to edit the form in dreamweaver. in the meantime if anyone knows anything feel free to post it :-D

Posted

I don't know much about codes, but i do know that putting a session id hard in a page is never really considered as very smart [this can cause other people to log in on other peoples account and you NEVER want that]

 

Maybe i am wrong here, but this looks very shabby to me [no offense]

Posted

I have to agree with Patrick on this one. Plus you only want it to show when someone isn't logged in so you need to put it within the if/else statement already set up on login.php.

 

Finally if you're having trouble with Dreamweaver, why don't you use the basic File Manager within admin function - its basic but you'll really get to learn the code then!!!

 

:huh: B) :unsure:

 

That's enough for now.

Posted

i always edit the files manually through FTP. im familiar with the code but im no expert allthough I should be after all these years lol.

Posted

This may not be what you want, but its an easy solution.

 

What I did (at one point..I later took it out because I wanted something else), was I created an image and image mapped the login page links to both sides since in the login page it gives you the option to login or create an account.

 

Then I inserted the <map>html code for the image and the map into english/index.php in place of the "Welcome Guest" text. My image was of two boxes. On left, Welcome guest, would you like to log in. On right, create an account.

 

The only problem with this is that it will always be there, whether someone is logged in or not, however, when someone is logged in, they would probably just ignore the box, if they even go back to the default page. I have noticed that most people don't return to the home page anyway unless they close the browser then reopen it since osc has easy searching and browsing options on every page.

 

If you do this, a good idea for text in the left part of the image would be "Are you logged in? If not, log in now" then link login now to the login page. Same for create an account, link that part of the image to the account creation page.

 

Just a thought.

Archived

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

×
×
  • Create New...