Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2014
    Posts
    5
    Plugin Contributions
    0

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

    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!

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

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

    Quote Originally Posted by DJHicks View Post
    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...

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

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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
    Last edited by Ajeh; 16 Feb 2014 at 03:34 PM.
    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!

  4. #4
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default 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.p...27#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.
    Twitch Base8 - Obsidian - This, is what's new.

  5. #5
    Join Date
    Feb 2014
    Posts
    5
    Plugin Contributions
    0

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

    Quote Originally Posted by mc12345678 View Post
    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...

    Quote Originally Posted by Ajeh View Post
    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!

  6. #6
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

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

    Quote Originally Posted by DJHicks View Post
    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...

 

 

Similar Threads

  1. v139a Is it possible to change this path: index.php?main_page=login
    By AndyPortia in forum General Questions
    Replies: 6
    Last Post: 23 Aug 2012, 05:12 PM
  2. How To Edit "index.php?main_page=login"?
    By Psykryph in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 9 Sep 2011, 06:32 AM
  3. Where to edit login page? ( index.php?main_page=login )
    By seian in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 26 Jan 2010, 02:30 PM
  4. How can I remove the New Customer Profile Form from the Login Page?
    By jaxbakers in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 7 Oct 2006, 06:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg