Forums / General Questions / How can I call a different login page from the index.php?main_page=login

How can I call a different login page from the index.php?main_page=login

Views: 3,525

Results 1 to 6 of 6
16 Feb 2014, 2:06 PM
#1
djhicks avatar

djhicks

New Zenner

Join Date:
Feb 2014
Posts:
5
Plugin Contributions:
0

How can I call a different login page from the index.php?main_page=login

Hi.

I want to manually add customers rather then have them sign up themselves.

I made a backup of the tpl_login_default and then removed the following code...

<?php echo zen_draw_form('create_account', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);" id="createAccountForm"') . zen_draw_hidden_field('action', 'process') . zen_draw_hidden_field('email_pref_html', 'email_format'); ?>
<fieldset>
<legend><?php echo HEADING_NEW_CUSTOMER; ?></legend>

<div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION; ?></div>

<?php require($template->get_template_dir('tpl_modules_create_account.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_create_account.php'); ?>

</fieldset>

<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SUBMIT, BUTTON_SUBMIT_ALT); ?></div>
</form>

This means my site just runs with a simple log in screen.... when adding new customers I quickly rename the tpl_login_default to tpl_login_default1 or something and then change the backup (original) file back to the tpl_login_default and then enter the customer details and submit then change file names back so sites just a log in page.

Its a pain in the ... but it works...

I was wondering what I would need to do to be able to simply change login on the main page to something totally random and beable to access the original login page to reg users.

As it is now going to home goes to domain/index.php?main_page=login

How could I get it so that I could manually enter say domain/index.php?main_page=onlymeregyou

I have tried copying the login folder in modules/pages and renaming... adding the name to the filenames list and such but theres more i'm missing and trying to figure out.

Could anyone help at all? Thank you very much in advance!

16 Feb 2014, 2:18 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How can I call a different login page from the index.php?main_page=login

DJHicks:

Hi.

I want to manually add customers rather then have them sign up themselves.

I made a backup of the tpl_login_default and then removed the following code...

<?php echo zen_draw_form('create_account', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);" id="createAccountForm"') . zen_draw_hidden_field('action', 'process') . zen_draw_hidden_field('email_pref_html', 'email_format'); ?> <fieldset> <legend><?php echo HEADING_NEW_CUSTOMER; ?></legend> <div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION; ?></div> <?php require($template->get_template_dir('tpl_modules_create_account.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_create_account.php'); ?> </fieldset> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SUBMIT, BUTTON_SUBMIT_ALT); ?></div> </form> ``` > > This means my site just runs with a simple log in screen.... when adding new customers I quickly rename the tpl_login_default to tpl_login_default1 or something and then change the backup (original) file back to the tpl_login_default and then enter the customer details and submit then change file names back so sites just a log in page. > > Its a pain in the ... but it works... > > I was wondering what I would need to do to be able to simply change login on the main page to something totally random and beable to access the original login page to reg users. > > As it is now going to home goes to domain/index.php?main_page=login > > How could I get it so that I could manually enter say domain/index.php?main_page=onlymeregyou > > I have tried copying the login folder in modules/pages and renaming... adding the name to the filenames list and such but theres more i'm missing and trying to figure out. > > Could anyone help at all? Thank you very much in advance!

Okay, so primary thing is, why the manual entry part? Why not just let them enter, but you have to "authorize" them or similar?

Secondly, if you recreate the page so that it is still accessible via the internet under some "obscure" name, you're just asking for trouble/people to still end up on it doing what you were trying to avoid (allowing guest to fill it out.)

So that leads to an option that if you don't want people to be able to fill out the information themselves and you want to spend your time filling it out instead of something else, then I would suggest an admin plugin that allows adding/creating customers.

If you still want to go down the path of some super secret place that only know about that allows you to enter the data to create an account, that upon completion will have all of the access rights that are normally provided to a guest of your site, then I suggest looking into how to implement define pages and of course the other code included in the newly filename scrambled version. Take a look at the requires and includes calls, the referenced file(s) may need to be renamed/copied/relocated/or...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Feb 2014, 2:21 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How can I call a different login page from the index.php?main_page=login

Would turning off the create account on the Store and adding the Add on plugin to create Customers from the Admin work for you?
http://www.zen-cart.com/downloads.php?do=file&id=1477

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Feb 2014, 2:32 PM
#4
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: How can I call a different login page from the index.php?main_page=login

I'm guessing you're not interested in using the built in customer authorization settings Zen Cart has?
Discussed here: http://www.zen-cart.com/showthread.php?212109-How-can-I-or-remove-disable-Add-to-Cart-button&p=1236827#post1236827

There are two pages you can create an account with login - split/regular and create_account

If you hide the code on the login page using <!-- *this is hidden *--> for the html section that refers to create_account page in split or regular mode... customers will only see login, **password **and forgot password. You won't need to unhide the code to use the create account page.

Then bookmark a link to the create_account page on your own computer for your site like this:
http://your_site.com/index.php?main_page=**create_account**

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

16 Feb 2014, 2:34 PM
#5
djhicks avatar

djhicks

New Zenner

Join Date:
Feb 2014
Posts:
5
Plugin Contributions:
0

Re: How can I call a different login page from the index.php?main_page=login

mc12345678:

Okay, so primary thing is, why the manual entry part? Why not just let them enter, but you have to "authorize" them or similar?

Secondly, if you recreate the page so that it is still accessible via the internet under some "obscure" name, you're just asking for trouble/people to still end up on it doing what you were trying to avoid (allowing guest to fill it out.)

So that leads to an option that if you don't want people to be able to fill out the information themselves and you want to spend your time filling it out instead of something else, then I would suggest an admin plugin that allows adding/creating customers.

If you still want to go down the path of some super secret place that only know about that allows you to enter the data to create an account, that upon completion will have all of the access rights that are normally provided to a guest of your site, then I suggest looking into how to implement define pages and of course the other code included in the newly filename scrambled version. Take a look at the requires and includes calls, the referenced file(s) may need to be renamed/copied/relocated/or...

Thank you for your reply.

The site content is not for the public its for a group of us but want a central hub if you like to be able to download things or indeed purchase stuff. This is why i'd like control without the possibility of having to sit and delete false or spam registrations.

Your right in that its still open to abuse...

Ajeh:

Would turning off the login on the Store and adding the Add on plugin to create Customers from the Admin work for you?
http://www.zen-cart.com/downloads.php?do=file&id=1477

Hello Ajeh... thank you for the link it seems perfect. I did search through the add ons but believe I only came across the one for v1.3 etc as this one references.

This should mean I can keep the login page as it is (edited so no creation) and add users via admin.

Thank you both very much!

16 Feb 2014, 4:37 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How can I call a different login page from the index.php?main_page=login

DJHicks:

Thank you for your reply.

The site content is not for the public its for a group of us but want a central hub if you like to be able to download things or indeed purchase stuff. This is why i'd like control without the possibility of having to sit and delete false or spam registrations.

Your right in that its still open to abuse...

Hello Ajeh... thank you for the link it seems perfect. I did search through the add ons but believe I only came across the one for v1.3 etc as this one references.

This should mean I can keep the login page as it is (edited so no creation) and add users via admin.

Thank you both very much!

Welcome. Good luck to you.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...