New Zenner
- Join Date:
- Nov 2007
- Posts:
- 58
- Plugin Contributions:
- 1
Login as Customer module [Support Thread]
No problem if you need any further help just let me know
Views: 59,659
New Zenner
No problem if you need any further help just let me know
New Zenner
I have installed the master password module, and it is working perfectly. Thank you for the advice.
Zen Follower
Hi vmmeup,
Just came back and tried to install the new 2.0 (from your web site, downloaded today) version. Unfortunately, I run in the same problem: the form in the admin / customers is fine, with the correct email and master password set, and links to : <form target="_blank" name="login" action="http://www.xxxxx.com/~yyyyy/index.php?main_page=login_as_customer" method="post">
But when I click on that form, I always get redirected to index.php?main_page=login, with empty forms for the email and the password...
Indeed, index.php?main_page=login_as_customer redirects immediately to the normal login page...
I used the 1.3.8 non-SSL version, without the master password which is already installed and working...
Thanks for any advice,
sanji
New Zenner
When did you donwload to package? The latest version of the mod v2.0 no longer has an SSL and NON SSL version. I changed the code to auto detect the site config and also added language file support. Just in case it was somehow the wrong package I uploaded the v2.1 that i have on the zen download page. I did check the package and all looks good. I also re-extracted it and copied to my 1.3.8 test site and all is working.
Although I had tested and used the old package without any problems. fell terrible that you are having these issues if you use skype or yahoo messenger pm me you handle and maybe I can help while your trying to get it working.
Zen Follower
I just redownloaded that 2.1 version from ZC, but the files are the same, so the error must from from somewhere else.
To be honest, I used a modified ZC shop, so I can not be 100% sure that the error is not from my side.
But the behavior is really strange: I click on the "Place Order" button, and get redirected to the normal login page, with empty fields. I add a customer's email and master password, click on login and then I get redirected on index.php?main_page=login_as_customer&set_session_login=true page, which means that the "Would you like to log as" is displayed... once I am already logged in!
You can see the result on the attached page. I will try to look more carefully tomorrow into that. But if you have any idea, please let me know. I do appreciate you take time to check on my issue.
Thanks,
sanji
New Zenner
hmm, I'm not sure I'm following you.
What happens when you are in admin customers and click place order?
it should bring you to /index.pgp?main_page=login_as_customer
You should see the page that says are you sure you want to login as:
With the customers information filled in.
Then when you click the Place order button on here you should be sent to:
/index.php?main_page=login&action=process
and it should log you in.
Based on the above information let me know what happens when you click on the place order from admin -> suctomers and then what happes when you click it from login_as customers
-Sid
New Zenner
When I click on the Place Order feature, I get redirected to a page as follows
I see the page that says are you sure you want to login as:
With the customers information NOT filled in. It is blank. I have tried several customers with the same problem.
Any ideas what causes this?
Zen Follower
vmmeup:
What happens when you are in admin customers and click place order?
it should bring you to /index.pgp?main_page=login_as_customer
I click on "Place Order" : I arrive on index.php?main_page=login
and the form is completely empty.
But once I fill the email and password, I arrive on the customer welcome page, with the following text : "Are you sure you want to log in as:" !!
kenwvs:
When I click on the Place Order feature, I get redirected to a page as follows
I see the page that says are you sure you want to login as:
With the customers information NOT filled in. It is blank. I have tried several customers with the same problem.
This is exactly the same problem I get...
sanji
New Zenner
Kenwva & Sanji,
Do both of you have register_globals = off? I haven't been able to test this on a test system with register_globals=off. The fact that you both don't see any of the data leads me to beleive that this could be the problem.
The thing is even if you were do have register_globals=off I'm posting the data from the admin -> customers page to the login_as_customer page and accessing the data using $_post['variable'] so it doesn't make any sense that it would be the register_globals, but I can't be sure as I haven't tested on a server with them off.
Sanji,
Weren't you getting the variable data with an older version of the script, but just having the SecurityToken problem?
New Zenner
If anyone has a server that they are 100% msure has register_globals=off and has tried this script on a stock ZenCart install I would appreciate any feedback as to weither it worked or not.
Zen Follower
vmmeup:
Kenwva & Sanji,
Do both of you have register_globals = off? I haven't been able to test this on a test system with register_globals=off. The fact that you both don't see any of the data leads me to beleive that this could be the problem.
Checking from admin/server_info.php, I can confirm that I have register_globals = ON. This should then not be the issue...
vmmeup:
Sanji,
Weren't you getting the variable data with an older version of the script, but just having the SecurityToken problem?
Yes, I was, but the script has been modified a lot since then. At that time, it was using a file in the root directory of ZC. And I confirm that data - except for the SecurityToken - where passed properly...
sanji
New Zenner
hmm that is very strange because the varianles haven't changed.. the only difference is I had to access them using $_POST['variable'] instead of just the variable itself. When I tried the original login_as_customer file as part of zen it would not get the variables until I used the $_POST.
I had to bring it in to ZEN so that ZEN would generate the SecurityToken and add it to the session so that I could grab it and use it to login.
I honestly have no idea why you wouldn't be getting any of the variables now. Is it possible for you to setup a duplicate of your site without any important information for testing on to see if we can figure this out?
You are defintaly using the 1.3.8 version I posted?
New Zenner
vmmeup:
Kenwva & Sanji,
Do both of you have register_globals = off? I haven't been able to test this on a test system with register_globals=off. The fact that you both don't see any of the data leads me to beleive that this could be the problem.
I am able to confirm that I have register_globals turned on.
I was able to rectify the problem by reinstalling the files. I did have it working, then I changed the admin password and it quit working. Once I reinstalled all of the files (except the master password file) it is working properly again. I am not sure what causes this, but I am happy none the less that it is working.
Thanks for the help
Ken
Zen Follower
Yes, absolutely, I am now using 1.3.8a and used the 1.3.8 version of your contribution.
If you don't mind checking, I indeed will set up a mirror copy of the site and give you full admin access, so you can see by yourself. I just need 1/2 days to get that ready. Will contact you by pm...
Thanks,
sanji
Zen Follower
FOUND THE PROBLEM !!!
If your settings for "Customer Shop Status - View Shop and Prices" (Configuration / Customer Details from admin) are
Customer must be approved to shop
0= Not required
1= Must login to browse
2= May browse but no prices unless logged in
0 or 2 - this contribution is working
1 - this contribution is NOT working, as ALL pages are redirected to the login page...
Any idea how to solve that issue?
sanji
New Zenner
Sanji,
Good find, I would never have though it could be that. The problem is I have it loading inside the Zen Site wrapper so ZenCan generate the securityToaken so I can use it for the login page. The problem is that ZEN is require the customer to be logged in to see any page which includes the login_as _customer page because it now see that as a customer page as well. I would say the way to fix that would probably be to figure out where it process this and code it so it ignores it if the site is being browsed from your own IP address. So that everyone else will have to login, but you won't allowing you to get to the login_as_customer.
-Sid
Zen Follower
I wonder if there is a way to declare login_as_customer in the includes/init_includes/init_customer_auth.php file, so that the authentification is not required for that specific page. I have tried to add "login_as_customer" in that file, but without success so far...
sanji
New Zenner
Just installed this (version 1.3.7 with master password) on a site with register_globals off and it works great so far.
Thanks for the mod!
New Zenner
Excellent! Glad to hear that. I'm working on packaging up my newest version which I have built in a memo addon.
Totally Zenned
V2.1 on a ZenCart 1.3.8a shop, global registers off by means of special php.ini files in all directories (my host ICDSoft says this only way to force register off functionality on their hosted sites).
This contribution work flawlessly in this configuration.
Tell staff why this post should be reviewed.