Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2013
    Location
    Subotica, Serbia
    Posts
    3
    Plugin Contributions
    0

    Idea or Suggestion second login page without sidebar, navbar etc. and on login redirect to custom page

    Hello iam trying to find ins and outs of zen cart 1.39 and 1.5, for now iam working on second login page on 1.39 it should be responsive, without sidebar, navbar etc and after successful login redirect to custom page(maybe ez page), so I have made some changes in
    index.php
    here i have made
    \includes\templates\template_default\common\html_header_custom.php --- this is a new file which i made, uses bootstrap
    here i have made something like if referer promotion then (some link which you get from mail promo) open second login and dont load (require) sidebar templates and navbar and that works great
    (i think here should not be any security issues)

    \includes\templates\template_default\common\html_header_custom.php
    this is a new file and here is the template for that second login form which is loaded from main index file when the user comes from custom link
    that is in bootstrap blahh blahh....

    \includes\modules\pages\login\header_php.php
    now this is where it all gets awesome
    first i catch referer if referer custom link and already loged in redirect to default page (or ez page - this is ok)
    if referer custom link and login success redirect again to ez page
    if referer custom link and errror redirect to custom page login and thats fine two
    but i couldnt use messageStack (maybe i didnt included required files but no matter i have only two error the form security token and user not
    found or pass not valid i have made array with does to errors and if set then show (with get from url),

    before this $zco_notifier->notify('NOTIFY_LOGIN_FAILURE');
    i have added if referer (custom link redirect to index page with custom params so i can catch them and show the second custom login page again with error msgs.


    now my question is did anyone had anything like this or something, i would love to make this work for now with no security flaws and maybe latter make some modules.

    Thank you

  2. #2
    Join Date
    Feb 2013
    Location
    Subotica, Serbia
    Posts
    3
    Plugin Contributions
    0

    Default Re: second login page without sidebar, navbar etc. and on login redirect to custom pa

    I dont know why but i cant edit this post.
    I wanted to add, is there a better way?
    My opinion is that there isnt, i wanted to do it with observers but i cant load whole template (second login) before everything.
    OR CAN I ?

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: second login page without sidebar, navbar etc. and on login redirect to custom pa

    I haven't done this type of modification, but had just a few comments, would suggest that generally speaking should use the template directory associated with your current template instead of template_default. That said, nothing about what is being done directly interferes with the default template (yet) but it's that generally speaking template modifications should be made to the active template rather than to all items.

    The second comment is that the message stack is a global variable that must be brought into the sub code that is going to populate it, and I think there is some sort of sequencing/history that could allow it to be removed prior to a legible display of the information.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Feb 2013
    Location
    Subotica, Serbia
    Posts
    3
    Plugin Contributions
    0

    Default Re: second login page without sidebar, navbar etc. and on login redirect to custom pa


    all works great but.... one problem :)
    when i turn on Customer Shop Status - View Shop and Prices to 1= Must login to browse;
    then i doesnt redirect me :)
    anyone knows the structure of how that works?
    iam tired of digging ;)
    ty

 

 

Similar Threads

  1. Login Should Redirect to ACCOUNT and not home page
    By limelites in forum General Questions
    Replies: 3
    Last Post: 2 Mar 2014, 06:43 PM
  2. Admin login page redirect
    By Brian Anderson in forum Customization from the Admin
    Replies: 1
    Last Post: 3 Jan 2014, 04:02 AM
  3. Replies: 1
    Last Post: 16 Apr 2011, 07:24 PM
  4. How do I Admin and login page custom templating?
    By oavs in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Oct 2010, 10:26 AM
  5. Login Page Redirect to My Account?
    By Zoethreads in forum General Questions
    Replies: 3
    Last Post: 27 May 2010, 02:28 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR