Jump to content
Sign in to follow this  
stevel

[Contribution] Login Page a la Amazon

Recommended Posts

ooooops.... :blush: my mistake. i got mixed up with another mod in the shopping cart procces.

You are right , only one step to crete an account. sorry for the misunderstanding.i can only say in my defence that i am new around and it was late. :blush:

Thanks again for the great mod and your reply, steve.

regards

unai


"Dream as if you'll live forever...

live as if you'll die today."

Share this post


Link to post
Share on other sites

Hi,

 

Gret contrib, thanks! It makes the site look a lot more professional.

 

I have one question though:

 

When my customer arrives at the login page, they ype in their password and then expect to be able to tab down to the password box but you cannot tab to that box, it just tabs to the radio button.

 

Is there any way to change this so the customer can tab straight from the email box to the password box?

 

Many thanks

 

Peter

Share this post


Link to post
Share on other sites

Oops! Looks like an experiment I was working on leaked out. In the call to tep_draw_password_field, change:

'maxlength="40" tabindex="2"'

to

'maxlength="40"'

Thanks for bringing this to my attention.

Edited by stevel

Share this post


Link to post
Share on other sites

That worked perfectly THANKS!!!

 

Oops!  Looks like an experiment I was working on leaked out.  In the call to tep_draw_password_field, change:

'maxlength="40" tabindex="2"'

to

'maxlength="40"'

Thanks for bringing this to my attention.

Share this post


Link to post
Share on other sites

I posted version 1.4 that has the tab fix. I also corrected an error in the Spanish define that had the text for HEADING_NEW_CUSTOMER defined as a duplicate of TEXT_NEW_CUSTOMER.

Share this post


Link to post
Share on other sites
I posted version 1.4 that has the tab fix.  I also corrected an error in the Spanish define that had the text for HEADING_NEW_CUSTOMER defined as a duplicate of TEXT_NEW_CUSTOMER.

 

I can't believe I am seeing this!!!

I've been looking for something like this, thank you thank you thank you!!!

 

You just made my day, no no, my week!

 

thanks again,

 

Elaine - who will problably be back asking you some questions!

:-"


"There are only 10 types of people in this world: those who understand binary, and those who don't. "

Share this post


Link to post
Share on other sites

Stevel,

 

Thanks for the great contrib. I have a question for you though ...

 

If you type an email address of an actual user and click sign in you get an error message that says "Your email address already exists in our records...." when it should say "Incorrect Password" or something similar.

 

Would it be easy to correct this?

 

Craig

Share this post


Link to post
Share on other sites

Also, it appears that the error message is defined as ENTRY_EMAIL_ADDRESS_ERROR_EXISTS, is this error used for anything else? In other words could I change it without worry of affecting something else somewhere else in the site?

 

Thanks!!

 

Craig

Share this post


Link to post
Share on other sites

I dont know what happened but not there is a password error that appears when your password does not match. Maybe the other error was cached?? I dont see how it would happen but something was causing it.

 

Anyway, that is working so all I am curious about is if I can change the other error's text. Let me know.

 

Thanks!

 

Craig

Share this post


Link to post
Share on other sites

Craig,

 

The only time the customer would get that error is if they had selected that they were a new user but the e-mail address already existed in the database. If the user selected that they had a password and entered it, but it was wrong, they would get a different error.

 

As far as I know, that define isn't used elsewhere, other than Create Account, but I think you're misunderstanding the situation.

Share this post


Link to post
Share on other sites

In my earlier post I meant to say ....NOW there is a password error .... So it seems to be working now. But when I was first testing it I SWEAR the password error would not display no matter what you did. It was the other error only.

 

As far as the other error I went ahead and changed it but just reworded it to make more sense and left it saying pretty much the same thing in case it was being used somewhere else. I am happy with it like it is I guess.

 

Is there a way to have the password entered on the login page taken over to the signup page if they are not a user yet? I guess you would not want it entered into both spaces in case they made a mistake but if you do not have it in at least one space they would think "well why did I have to enter it on the first screen if it was for no reason!" Although they dont actually HAVE to enter it but they dont know that.

 

Any ideas?

 

Craig

Share this post


Link to post
Share on other sites

Ahh.. You know, maybe I will just move the "I am a new customer" up and make it be selected by default, that should do the trick. Is there an easy way to make it default?

 

Also, would you know how to convert the "gender" radio buttons to a pull down box? I think it is tep_draw_pull_down_menu('something', 'something') but I dont know what the something something is. Could you tell me how to do this?

 

I appeciate the help!!

 

Thanks!

 

Craig

Share this post


Link to post
Share on other sites

For some odd reason after replacing the files from the latest contribution, I still get the TEXT_LOGIN_ERROR even if the correct email/password is entered. It does still log a person in but it doesnt seem to redirect properly either. Any suggestions or are the included files not correct?


Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

The files are correct as far as I know. The combination of symptoms suggested an editing error, perhaps a missing or extra quote. Did you use the files directly from the contribution or did you apply the edits manually?

Share this post


Link to post
Share on other sites

I used the files that came with the package.

 

I believe I figured out my problem, I guess it is redirecting to the login.php instead of the appropraite page, and since it is redirecting to the snapshot (error) it displays it again.

 

Thanks though ;)


Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

I tried, with my store, an error while logging in and then correctly logging in, and it worked properly. Let me know exactly what is going wrong (and perhaps give me a link to your store) and I'll try to help you.

Share this post


Link to post
Share on other sites

Hi Steve

 

i just came across your Amazon style login page and tried to install it but i have email vaildation in my login.php file can can't work out how to get around it.

 

here is the code from lines 13 - 54 in login.php

 

require('includes/application_top.php');

 

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)

if ($session_started == false) {

tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

 

$error = false;

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {

$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);

$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

if (isset($HTTP_POST_VARS['pass'])){

$check_customer_query_val = tep_db_query("select customers_id, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

$new_query_for_val = tep_db_fetch_array($check_customer_query_val);

tep_redirect(tep_href_link('pw.php', 'id=' . $new_query_for_val['customers_id'] . '&pass=' . $HTTP_POST_VARS['pass'], SSL));

}

// Check if email exists

//$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_validation, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

//if (!tep_db_num_rows($check_customer_query)) {

// $error = true;

// } else {

// $check_customer = tep_db_fetch_array($check_customer_query);

 

// Check if email exists and status is activated

$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_validation, customers_default_address_id, customers_status from " . TABLE_CUSTOMERS . " where customers_status = '1' and customers_email_address = '" . tep_db_input($email_address) . "'");

if (!tep_db_num_rows($check_customer_query)) {

$HTTP_GET_VARS['login'] = 'fail';

$error = true;

} else {

$check_customer = tep_db_fetch_array($check_customer_query);

 

 

// Check that password is good

if ((!tep_validate_password($password, $check_customer['customers_password'])) || $check_customer['customers_validation'] == '0') {

$error = true;

if ($check_customer['customers_validation'] == '0') $setme = true;

} else {

if (SESSION_RECREATE == 'True') {

tep_session_recreate();

}

 

any ideas please?

 

many thanks


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

I don't understand what you are trying to do here. What sort of validation is this? This contrib does the appropriate checks to see if a customer is registered or not. Try it as supplied and let me know if it is not adequate.

Share this post


Link to post
Share on other sites
I don't understand what you are trying to do here.  What sort of validation is this?  This contrib does the appropriate checks to see if a customer is registered or not.  Try it as supplied and let me know if it is not adequate.

long day - forgot to add i have email validation installed.

 

the instructions you gave work on a clean install but the lines that are supposed to be replaced are modified (13-54)

 

i was trying to work around the email vaildation mod


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Hi, I would love to use this contri but am still on MS1. Anyone managed to make it work on that ? I have tried it but get a 404 error?

Share this post


Link to post
Share on other sites

Stevel - I do not know if you still support this mod, but I have a issue and perhaps you or someone could point me in the right direction.

 

The login page has worked perfectly for months

yesterday I applied all of the 2.2rc1 bug fixes and improvements

 

Now, when the new customer enters an email address and selects No, I am a new customer, they are redirected to the create-account page as normal, but the Email Address does NOT carry forward.

 

Any Idea on where to look or why this behaivor has started??

 

 

Thank you in advance


-Dave

Share this post


Link to post
Share on other sites

I do still support it but this forum keeps expiring my topic subscriptions so I don't see new posts. I will have to remember to keep renewing them.

 

I have not yet played with the RC1 fixes so can't comment on that.

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
Sign in to follow this  

×