Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Login Page a la Amazon


stevel

Recommended Posts

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

a nice little mod.

 

One suggestion I would have is, use a little javascript so if the user starts typing in the password field (tabs to it, or points the mouse there and starts typing, etc), the radio button by "I have a password" is auto-selected.

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

That's a pretty snazzy login. I like it.

 

Is there anyway you can re-implement the define('TEXT_NEW_CUSTOMER_INTRODUCTION', ''); ?? :D

Link to comment
Share on other sites

dreamscape, I had thought of doing that. But Amazon doesn't, so I figured it was unnecessary. The form does the right thing anyway - if you type in a password, it assumes you have one and tries to log you in.

 

Invisix, I would suggest that this text be displayed on the Create Account page if you wanted it. Quite simple to add on your own, but that wasn't relevant to this contribution. On the other hand, Amazon does put up a "New Customer Benefits" box, so maybe there is a good reason for this anyway. I'll play with it and see what I can come up with.

Link to comment
Share on other sites

I just installed it @ www.hanwijman.nl/catalog/ (Dutch!)

 

It is awesome and easy to install. I think it is a better way to use than the standardway.

 

Thank you for sharing it with us!

Link to comment
Share on other sites

id like to hear feedback on this amazon style login compared to the Purchase without account contribution. Pros? Cons? I'm trying to make it as easy as possible for the customer - i have too many abandoned carts with the regular login. Thanks for your input!

Link to comment
Share on other sites

First of all, thanks for your contribution.. it really works..

 

But, I've tested under two different roots.

One under the catalog root is working fine.

But the other under the public_html root is not working at all..

When I clicked my account, it shows me two options.

Creating a new account link(sign as a new comer) shows me "can't find the page" error. Is this contribution not working under public_html root?

If not, which part should I have to modify?

Link to comment
Share on other sites

I'm confused - do you have two different stores? I don't see how you can have a single store under two different roots.

 

If you select that you are a new customer, it redirects to the page defined by FILENAME_CREATE_ACCOUNT in filenames.php. That's the same as if you had clicked on the "new customer" button in the original page. What is the file name that gets the 404?

Edited by stevel
Link to comment
Share on other sites

First of all, I installed os2.2 under two different databases.

One is under public_html and the other one is running under

catalog root. I just installed to see how it works.. I'm going to

erase catalog root folder later.

 

Once I clicked Sign In on the public_html root in order to creat an account,

it shows me this link

 

https://host110.ipowerweb.com/~username/log...43b3ac134cacc7e

 

with 404 error. However, the catalog based root works fine.

 

 

I don't know what the problem is...

Link to comment
Share on other sites

It looks as if HTTPS under your public_html root doesn't work. Does your host require HTTPS files to be in a separate folder? Some have, I have read.

 

Do you have a real URL I can look at?

Link to comment
Share on other sites

hi stevel,

 

great contrib, all works fine.

 

Just one question that I would like to pick up again: radio button.

Is it possible to start that page with the radio button being set on yes, my password is ..?

 

that would be great .

Link to comment
Share on other sites

Sure. Find the two lines that call tep_draw_radio_field. Here's the first one:

 

tep_draw_radio_field('new_customer','Y',true)

 

Note the last parameter is "true". This says whether or not to make that button selected. Simply change this one to "false" (no quotes) and the "false" in the second one to "true". Don't change the Y and N values.

 

Incidentally, I'm still working on adding the "benefits of registering" text. For some reason, I'm having trouble with getting it to come out right, and other things have gotten in the way. Stay tuned.

Link to comment
Share on other sites

Hi, Stevel

First of all, thanks for your contributions.

I've already installed one of your contributions, Country-State Selector.

It really works well on my site..

 

I also tried to install Login Page a la Amazon, but doesn't work on my site.

The page shows me http 404 error. I think I have a probelm with my configure.php file setting. Currently I've removed Login Page a la Amazon,

but I'll load it after fixing this problem first..

 

This is my /include/configure.php

define('HTTP_SERVER', 'http://relyonyou.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://host180.ipowerweb.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', true); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'relyonyou.com');
define('HTTPS_COOKIE_DOMAIN', 'host180.ipowerweb.com');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '/~relyonyo/');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/~relyonyo/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', '/home/relyonyo/public_html/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', 'removed for post');
define('DB_SERVER_PASSWORD', 'removed for post');
define('DB_DATABASE', 'removed for post');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

my root folder is pub_html

 

I'll appreciate any help.

 

Thank you

Link to comment
Share on other sites

Well, I'd like to help, but you haven't given me much to go on. For example, what page gives you the 404? What's the URL in the browser title bar when that happens? Can you install the "Amazon" page to an alternate name (such as login2.php) so I can try it?

Link to comment
Share on other sites

Thanks Stevel.

 

I just installed Amazon login.

 

I didn't use name such as long2.php

 

You can just try relyonyou.com

 

Once you click My Account and try to create an account,

 

you will see the same error that I've mentioned above..

 

Can this happen because of wrong configure.php setting?

 

HTTP 404 error.

 

If you need additional info, just let me know.

 

Thanks

Link to comment
Share on other sites

Thanks for reporting this. My mistake.

 

In login.php, replace:

 

      tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT));

 

with:

 

      tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT,'','SSL'));

 

This is only a problem for sites that use the ~username syntax for SSL connections. Let me know how this works.

Link to comment
Share on other sites

Thanks for your advice, Stevel.

 

I seems working now.. but I did modify my includes/configure.php file.

Please take a look at this.

 

 define('HTTP_SERVER', 'http://relyonyou.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://host180.ipowerweb.com/~relyonyo'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', '/');
 define('HTTPS_COOKIE_DOMAIN', '/');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/relyonyo/public_html/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

Right now, the main login problem with "Login Box" on the right column

seems to be solved by chaning configure.php above.

 

However, After the address such as https://host180.ipowerweb.com/~relyonyo/account.php doesn't show me encrypted code like osCsid=ebd69960e659e295943b3ac134cacc7e.

 

Do you have any idea about that and does will it cause a serous security problem?

 

 

By the way, your problem works fine on my website

Thank you.

Link to comment
Share on other sites

I think your definitions for the COOKIE_DOMAIN defiines are wrong. They should match the server domains. Whst you'll want to check is to see if you can add items to the cart and THEN log in, and have your cart preserved. My guess is that it won't be.

Link to comment
Share on other sites

This is a cool contribution, easy install as well! :)

 

I am having an issue with my auto login contribution now tho...

Both Contributions use the login.php file, so if you can explain what I should revise in order to make them both work, I will appreciate that! :)

 

From the auto logon install instructions:

 

################################################################################

####################

login.php Modification

################################################################################

####################

 

        tep_session_register('customer_id');

        tep_session_register('customer_default_address_id');

        tep_session_register('customer_first_name');

        tep_session_register('customer_country_id');

        tep_session_register('customer_zone_id');

 

// #CHAVEIRO14#  Autologon

        if ((ALLOW_AUTOLOGONLOGON == 'false') || ($HTTP_POST_VARS['remember_me'] == '')) {

              tep_autologincookie(false);

  }

        else {

              tep_autologincookie(true);

  }

// #CHAVEIRO14#  Autologon END

 

        tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'");

 

 

################################################################################

####################

login.php Modification 2

################################################################################

####################

                  <tr>

                    <td class="main"><b><?php echo ENTRY_PASSWORD; ?></b></td>

                    <td class="main"><?php echo tep_draw_password_field('password'); ?></td>

                  </tr>

<?php // #CHAVEIRO14# Autologon

      if ( (ALLOW_AUTOLOGON == 'true') && ((isset($HTTP_COOKIE_VARS['cookie_test']) && (SESSION_FORCE_COOKIE_USE == 'True')) || (SESSION_FORCE_COOKIE_USE != 'True')) ) {

?>

                <tr>

          <td>

    </td>

          <td align="left" class="smalltext"><?php echo tep_draw_checkbox_field('remember_me','on', (($password == '') ? false : true)) . ' ' . ENTRY_REMEMBER_ME; ?></td>

                  </tr>

<?php    }

// #CHAVEIRO14# Autologon END  ?>

                  <tr>

                    <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

                  </tr>

 

Thanks again!

Link to comment
Share on other sites

What's the problem?

 

I tried this contribution and found it won't work for my site because my SSL and non-SSL pages are in different domains, so the cookie set by the SSL page can't be seen by non-SSL pages.

 

The two shouldn't otherwise interfere with each other - all you would have to do is make sure that the "modification 2" was in the proper place on the page.

Link to comment
Share on other sites

Exactly. The modification 2 should start below:

<tr>

<td class="main"><b><?php echo ENTRY_PASSWORD; ?></b></td>

<td class="main"><?php echo tep_draw_password_field('password'); ?></td>

</tr>

 

 

BUT, your mod replaced these lines, so I don't know where to add them....can u please copy & paste this section in your file with the modifications?

Link to comment
Share on other sites

by the way, I am using SSL too...so is there any way to make them work together?

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...