Forums / Managing Customers and Orders / second login page without sidebar, navbar etc. and on login redirect to custom page

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

Started by dexy on 2 May 2014, 10:02 PM · Views: 2,554

Results 1 to 4 of 4
2 May 2014, 10:02 PM
#1
dexy avatar

dexy

New Zenner

Join Date:
Feb 2013
Location:
Subotica, Serbia
Posts:
3
Plugin Contributions:
0

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 :D
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

3 May 2014, 5:13 PM
#2
dexy avatar

dexy

New Zenner

Join Date:
Feb 2013
Location:
Subotica, Serbia
Posts:
3
Plugin Contributions:
0

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

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 ?
:D

4 May 2014, 12:27 AM
#3
mc12345678 avatar

mc12345678

Totally Zenned

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

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

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

15 May 2014, 4:35 PM
#4
dexy avatar

dexy

New Zenner

Join Date:
Feb 2013
Location:
Subotica, Serbia
Posts:
3
Plugin Contributions:
0

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

:D
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