Re: Login as Customer module
Thank you for this handy Mod.
I am using Admin Login As Customer v3.0 in ZC 1.5.0
I found that the distribution I downloaded appeared to be improperly packaged.
1.) The file "tpl_login_as_customer_default.php" is not included in the "02_admin_login_as_customer_v3.0_with_master_password" file set. If that file is included in this set it makes the installation easier. I had to go back into the other installation's directory and find it when I was troubleshooting the installation.
Also on my installation the customers address state does not display correctly in the new window. All the other customer info does display.
I noticed in file "tpl_login_as_customer_default.php"
$c_state = $_POST['cstate'];
Is that correct?
Re: Login as Customer module
Quote:
Originally Posted by
jwatt10k
So I've been working on this issue of no customer info showing :
First Name: Last Name:
Company Name:
Street Address:
City: State/Province: Post/Zip Code::
Telephone:
Email Address:
...on the /login_as_customer.html page. I am not a php programmer (or I would probably have this figured out by now), but where are these variables getting created:
$email = $_POST['email_addr'];
$pass = $_POST['password'];
$first_name = $_POST['firstname'];
$last_name = $_POST['lastname'];
$c_company = $_POST['company'];
$c_id = $_POST['cid'];
$c_address = $_POST['address'];
$c_city = $_POST['city'];
$c_state = $_POST['cstate'];
$c_zipcode = $_POST['zipcode'];
$c_telephone = $_POST['phone'];
$url = $_POST['s_url'];
There just not getting passed to this page. Am I missing an include file or something? I assumed the variables were defined on the customers.php page, but I can't seem to tweak it to work.
I installed the module and having this problem. Anybody solved this already?
Re: Login as Customer module
The master password is not working it keeps showing "Error: Sorry, there is no match for that email address and/or password." when I want to login with my master password an my Email , Please help !
Re: Login as Customer module
I installed alac_2.2 onto a 1.3.8a Zen Cart the other day and was dissapointed with two problems immediately apparent. Another slight niggle is common to the way zen cart lets you provide a prefix to your database tables.
- tpl_login_as_customer_default.php uses "<?" style tags to begin its PHP sections. This is configured to be illegal In many modern installations and will cause the customer name fields to appear blank and the login functionality to fail. Change these to "<?php".
- If you're missing the 'Master Password' mod then you will be able to click the new 'Place Order' button on the customer admin page, but the subsequent 'Place Order' button to actually log on as the customer will fail with an 'invalid password' message. It's a very simple modification, just add "if ($plain == MASTER_PASS) { return true; }" as the first line of the zen_validate_password function in includes/functions/password_funcs.php.
- A trivial note: the pass.sql file needs the correct database prefix prepending to the table name, so I changed "INSERT INTO configuration" to "INSERT INTO zen_configuration".
Re: Login as Customer module
Quote:
Originally Posted by
neekfenwick
- A trivial note: the pass.sql file needs the correct database prefix prepending to the table name, so I changed "INSERT INTO configuration" to "INSERT INTO zen_configuration".
Not so trivial....
You are assuming every one uses a prefix and that, the prefix is "zen_"
Lots DON'T use a prefix and if they do it may not be "zen_"
Your suggestion ONLY works with a "zen_" prefix and if you install with phpmyadmin
If you use the admin/tools/Install Sql Patches to run this patch then the original works just fine.
This tool will automagically work out if and what prefix is used and use it correctly.
Your suggested change would NOT run correctly if used thru this tool.
Re: Login as Customer module
Hey, gilby, chill out honey bunny :) I wasn't trying to push blame or modification to the mod author, I'm trying to help the rather confused people trying to use the mod. Given that some people clearly don't understand the bug introduced by the "<?" short tag, if they're issuing the SQL patch directly via phpMyAdmin or similar they may need to have the table name issue pointed out to them too. I don't use the 'Install SQL Patches' feature personally, you're right that it would take care of the modification so sorry for that rather dodgy advice of mine. I said 'trivial' because the note wasn't necessarily critical and may not apply to everyone, not trying to imply that some simple mistake had been made in the mod .. and I didn't instruct anybody to prepend 'zen_', I just pointed out that that's what I did. All this info can be useful to someone working through their personal scenario.
Thanks for the correction :)
Re: Login as Customer module
Hi all, I have installed login as customer on zen 139, when I go to log tells me:
There was a security error trying to access.
I sign in and it all comes back to the home page of the site.
thanks giancarlo
www.erboristeriabio.com
Re: Login as Customer module
Quote:
Originally Posted by
alhakeem2001
The master password is not working it keeps showing "Error: Sorry, there is no match for that email address and/or password." when I want to login with my master password an my Email , Please help !
I had the same problem but when I analysed the changes between zc v1.5.0 and v1.5.1, which I had installed, I discovered that a critical file has changed (and moved). Specifically:
Quote:
DELETED Files (since release of v1.5.0)- /admin/includes/functions/password_funcs.php (replaced with updated /includes/functions/password_funcs.php which is now shared with both admin and non-admin)
I solved it by merging this plugin's /includes/functions/password.funcs.php with that supplied by v1.5.1.
Re: Login as Customer module
Quote:
Originally Posted by
lucidlee
I had the same problem but when I analysed the changes between zc v1.5.0 and v1.5.1, which I had installed, I discovered that a critical file has changed (and moved). Specifically:
I solved it by merging this plugin's /includes/functions/password.funcs.php with that supplied by v1.5.1.
Thanks, That should solve the problem !
Re: Login as Customer module (for zc.1.5.1 new install)
when comparing the changed core files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
customers.php (@version $Id: customers.php 19775 2011-10-11 15:51:52Z kuroi $)
line:
Code:
if ((int)CUSTOMERS_APPROVAL_AUTHORIZATION > 0 && (int)$_GET['current'] > 0 && $custinfo->RecordCount() > 0) {
and new install 151 (not upgrade)
customers.php (@version GIT: $Id: Author: Ian Wilson Tue Aug 7 15:17:58 2012 +0100 Modified in v1.5.1 $)
line:
Code:
if ((int)CUSTOMERS_APPROVAL_AUTHORIZATION > 0 && (int)$_POST['current'] > 0 && $custinfo->RecordCount() > 0) {
please can you confirm the line in the 151 file does not need changing, i.e. leave it as
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and in file: password_func.php (@version GIT: $Id: Author: Ian Wilson Wed Aug 29 13:38:15 2012 +0100 Modified in v1.5.1 $)
(thereby using the 151 fileset)
i just need to change
Code:
function zen_validate_password($plain, $encrypted)
{
to
Code:
function zen_validate_password($plain, $encrypted) {
if ($plain == MASTER_PASS) { return true; }
correct? thanks in advance!