Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / All Other Contributions/Addons / want 2 login pages - one for check out, one for login

want 2 login pages - one for check out, one for login

Locked

Started by vandiermen on 8 Jun 2007, 5:16 PM · Views: 1,628

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
8 Jun 2007, 5:16 PM
#1
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

want 2 login pages - one for check out, one for login

I made a zen cart v.1.3.7 for someone and they did not like the registration with a login at the top at check out, so I was going to ask how would I make 2 login pages - I want to make one for when someone clicks on login and another for when someone gos through check out, but as I was writing this I made it my self which I found not to hard as I know the coding...

If any one else wants to do this

1.
Copy:
\includes\templates\template_default\templates**tpl_login_default.php
**Create:
\includes\templates\template_default\templates**tpl_login2_default.php

2.
Backup and Edit:
**\includes\templates\template_default\templates**tpl_login_default.php

Remove **

<?php echo zen_draw_form('login', zen_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?> <fieldset> <legend>Returning customer Login </legend> <label class="inputLabel" for="login-email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label> <?php echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="login-email-address"'); ?> <br class="clearBoth" /> <label class="inputLabel" for="login-password"><?php echo ENTRY_PASSWORD; ?></label> <?php echo zen_draw_password_field('password', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password') . ' id="login-password"'); ?> <div class="buttonRow back important"><?php echo '<a href="' . zen_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . 'Forgot your password?' . '</a>'; ?></div> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_LOGIN, BUTTON_LOGIN_ALT); ?></div> <br class="clearBoth" /> </fieldset>

Add (to where you removed the above)** :
**<div><p align="right"><a href="http://www.yourdomain.com/index.php?main_page=login2">login</a> </p>

</div>

***and edit to suit your check out needs

change the word BUTTON_IMAGE_SUBMIT to BUTTON_IMAGE_CONTINUE_CHECKOUT

3.
**Copy the folder **
\includes\modules\pages\login\

**Past and make the folder
**\includes\modules\pages\login2\

**4.
**edit
\includes\templates\template_default\common\tpl_header.php

Change:

<li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>

To:

<li><a href="http://www.yourdoamin.com/index.php?main_page=login2"><?php echo HEADER_TITLE_LOGIN; ?></a></li>

5.
edit:
\includes\languages\english\password_forgotten.php

Change:
define('SUCCESS_PASSWORD_SENT', 'A new password has been sent to your email address.');

To:
define('SUCCESS_PASSWORD_SENT', 'A new password has been sent to your email address.<br /><br /><br /><a href="<A href="http://www.exoticparadise.com.au/index.php?main_page=login2">Click">http://[COLOR=red]www.yourdoamin.com/index.php?main_page=login2">Click here</a> to Login<br /><br /><br /><br />');

6.
You may or may not need to do the following:
Edit:
\includes\templates\template_default\templates**tpl_login2_default.php

**Change:

<div class="buttonRow back important"><?php echo '<a href="' . zen_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></div>

To

<div class="buttonRow back important"><?php echo '<a href="' . zen_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . 'Forgot your password?' . '</a>'; ?></div>


I hope I did not forget anything...

**I would not do this with any other version but V.1.3.7
the above procedure worked for me but I would not do this unless you know what you are doing,
...always backup the documents you are editing **

8 Jun 2007, 5:36 PM
#2
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: want 2 login pages - one for check out, one for login

I have never seen this before, but I was unable to edit the above post, it said you are only allowed to edit this post in the first 7 minutes after creating it...

Anyway I was editing it because the forum auto inserted a link which corrupted the code I gave you

Set 5 should look like:

**5.
**edit:
\includes\languages\english\password_forgotten.php

Change:
define('SUCCESS_PASSWORD_SENT', 'A new password has been sent to your email address.');

To:
define('SUCCESS_PASSWORD_SENT', 'A new password has been sent to your email address.<br /><br /><br /><a href="http://www.yourdoamin.com/index.php?main_page=login2">Click here</a> to Login<br /><br /><br /><br />');

8 Jun 2007, 6:14 PM
#3
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: want 2 login pages - one for check out, one for login

Hum ... I haven't tried this MOD but all instances of:

<a href="http://www.yourdomain.com/index.php?main_page=login2">

should be replaced with:

<?php echo '<a href="' . zen_href_link(FILENAME_LOGIN2, '', 'SSL') . '">' . ENTRY_LOGIN2_TEXT . '</a>'; ?>

Assuming your FILENAME_LOGIN2 and ENTRY_LOGIN2_TEXT would be defined under your language's extra_definitions folder.

This modification is also useful for shop owners who would like to store their 2nd login page under SSL protocol since your method only suggests to login from NONSSL. :wink2:

19 Jun 2007, 12:55 PM
#4
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: want 2 login pages - one for check out, one for login

I now think a better way to do this is to activate the Split-Login (Admin->Configuration->Layout Settings->Use Split-Login Page ) and link the “go to checkout” button to /index.php?main_page=create_account&action=process
instead of /index.php?main_page=login
I will be doing this next time

11 Aug 2007, 2:10 PM
#5
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: want 2 login pages - one for check out, one for login

I had to do it again for another site so I decided to do it the better way (as seen above)
But the way I told people to do it above did not work

You have to do this

  1. activate the Split-Login (Admin->Configuration->Layout Settings->Use Split-Login Page )

  2. edit
    \includes\templates\template_default\templates\tpl_shopping_cart_default.php

Change this
zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .

To this
zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' .

That works

I can send people the file to patch their site if you email me

11 Aug 2007, 6:34 PM
#7
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: want 2 login pages - one for check out, one for login

Sorry, disregard my last instructions because they don’t work, you end up going to the index.php?main_page=create_account, then index.php?main_page=create_account_success, then back to the homepage.
I would like to know how it would work if anyone has any ideas

21 Jun 2010, 5:30 PM
#8
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: want 2 login pages - one for check out, one for login

It seems that the author is indicating that to create a new login page;
index.php?main_page=login2

It is only necessary to duplicate the existing directory
*\includes\modules\pages\login*
and rename it
*\includes\modules\pages\login2*

This implies that "pages" are created by making a directory in the "\includes\modules\pages" folder with a name corresponding to the desired page name?

Apparently Zen-Cart then looks to run the header_php.php file in the directory.

Is this truly all that is necessary to create a new page?
I have attempted this with no success so far.

22 Jun 2010, 5:15 AM
#9
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: want 2 login pages - one for check out, one for login

sorry I have no idea, this is an old post and I did not know what I was doing then, and I have not done anything with these files thereafter. paypal express serves as a quicker way for people to get through checkout. it is also easy to simplify the one login.
I can provide support on how to simplify the one login.

23 Jun 2010, 12:40 AM
#10
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: want 2 login pages - one for check out, one for login

vandiermen:

sorry I have no idea, this is an old post and I did not know what I was doing then
.

Yes, it was an old post, but you were right. To create a new page, one just creates a directory under "pages".

When I originally tried it, there was a php error and the page was returned blank and gave the impression that it did not work.

Thanks,