Forums / Addon Admin Tools / Login as Customer module [Support Thread]

Login as Customer module [Support Thread]

Results 1 to 20 of 241
14 Dec 2007, 20:09
#1
vmmeup avatar

vmmeup

New Zenner

Join Date:
Nov 2007
Posts:
58
Plugin Contributions:
1

Login as Customer module [Support Thread]

NOTE: This sort of feature is already built-in since Zen Cart v1.5.7, no plugin required.

Hello I have developed a module that allows you to login as a customer from the backend of zencart to place an order. A button apperars under customers that says place order and it will automatically open a new windows and talke you to the frontside on Zen and log you in as that customer. Hope you enjoy and if you have any suggestions please feel free to let me know.

It's available in the downloads section. Download: Admin login as customer plugin


It can be demoed here. http://www.vmitek.com
14 Dec 2007, 20:10
#2
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Login as Customer module [Support Thread]

Actually there already is a mod that does this too (master password)
14 Dec 2007, 20:32
#3
vmmeup avatar

vmmeup

New Zenner

Join Date:
Nov 2007
Posts:
58
Plugin Contributions:
1

Re: Login as Customer module [Support Thread]

This uses Master Password, the difference is you don't have to lookup the customer on the back end copy their email address, then go to the front end to login. You just select the customer and click place order.
14 Dec 2007, 20:49
#4
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Posts:
893
Plugin Contributions:
0

Re: Login as Customer module [Support Thread]

Hi,

You're mod appears to rely on register_globals being switched on. 99% of Zen Cart users will have it switched off because it is a security risk.

A warning about it being switched on should have appeared when you installed your demo version of Zen Cart.

Regards,
Christian.
14 Dec 2007, 20:53
#5
vmmeup avatar

vmmeup

New Zenner

Join Date:
Nov 2007
Posts:
58
Plugin Contributions:
1

Re: Login as Customer module [Support Thread]

Thanks for the heads up. I will fix that. I unfortuanlty don't have that choice because my hosting provider has it on and I deployed Zen from cpanel using fantasico which I would assume is also the case with alot of Zen users. I think there are alot that use this way of deploying and probably also have globals on, but it is better to not use....thanks for the heads up.
15 Dec 2007, 02:56
#6
vmmeup avatar

vmmeup

New Zenner

Join Date:
Nov 2007
Posts:
58
Plugin Contributions:
1

Re: Login as Customer module [Support Thread]

Updatred version that allows for SSL support if you have zen configured to use SSL support admin as well as front end.
See downloads area.
24 Dec 2007, 17:10
#7
jmeca avatar

jmeca

New Zenner

Join Date:
Nov 2006
Posts:
44
Plugin Contributions:
0

Re: Login as Customer module [Support Thread]

Hello everybody:
I installed this contibucion on a page proof and everything right in the installation but when I asked to place order, go to a page that says 404, Not found.
Someone knows it can happen or if i did something wrong.
Another wondered if someone knows this contribution is compatible with Super Orders 2.

Greetings.
Merry Christmas
24 Dec 2007, 23:57
#8
vmmeup avatar

vmmeup

New Zenner

Join Date:
Nov 2007
Posts:
58
Plugin Contributions:
1

Re: Login as Customer module [Support Thread]

There is a file that get's copied to the root of your sen installation. The name is login_as_customer.php. In that file you will find a line of code as follows:

<form name='form1' action='/index.php main_page=login&action=process' method='post'>

If you have installed zen into a sub-directory you need to edit this line of code to incluse the sub directory before the index.php.

If you had you Zen installation like so http://www.domain.com/test/ then the line would look like the following:

<form name='form1' action='/test/index.php main_page=login&action=process' method='post'>

If you would like to see a demo of this mod you can go to http://www.vmitek.com/zencart/ I also have other mods installed on this demo site. You can find a complete list of mods on the site.

-vmmeup
26 Dec 2007, 13:07
#9
sanji avatar

sanji

Zen Follower

Join Date:
Jan 2005
Posts:
138
Plugin Contributions:
0

Re: Login as Customer module [Support Thread]

Thanks for this mod. I would suggest to underline the necessity to change the <form name='form1' action='/index.php main_page=login&action=process' method='post'> line to reflect the exact path in the readme file - I was blocked there for a while.

Still, I have a problem: when I click on the Place Order button, I arrive on the login page, but get a "Security Error". This is a 1.3.8 feature, so I wonder, is this mod compatible with the latest version of ZC? If yes, do you know where this problem could come from? Login with master password is working fine...

sanji
26 Dec 2007, 14:17
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Login as Customer module [Support Thread]

Instead of hard-coding
[php]
<form name='form1' action='/index.php main_page=login&action=process' method='post'>[/php]

you should use the php constant DIR_WS_CATALOG which will automatically account for installation in a subdirectory.

Something like
[php]
<form name='form1' action='<?php echo DIR_WS_CATALOG;?>index.php main_page=login&action=process' method='post'>[/php]
Not sure if it needs to be stated a little differently, but that is the constant to use.

Perhaps[php]
<?php echo '<form name="form1" action="' . DIR_WS_CATALOG . 'index.php main_page=login&action=process" method="post">';?>[/php]
26 Dec 2007, 15:22
#11
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Posts:
1,782
Plugin Contributions:
4

Re: Login as Customer module [Support Thread]

<?php echo zen_draw_form('login', zen_href_link(FILENAME_LOGIN, 'action=process', 'SSL')) . zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
26 Dec 2007, 16:04
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Login as Customer module [Support Thread]

Right, that's the real answer to the problem! :-)
27 Dec 2007, 13:16
#13
sanji avatar

sanji

Zen Follower

Join Date:
Jan 2005
Posts:
138
Plugin Contributions:
0

Re: Login as Customer module [Support Thread]

Not working for me...

I changed

<div align="center"><form target="_blank" name="login" action="' . $login_as_customer . '" method="post">
<input type="hidden" name="firstname" id="firstname" value="' . $c_firstname . '">
<input type="hidden" name="lastname" id="lastname" value="' . $c_lastname . '">
<input type="hidden" name="email_addr" id="login-email-address" value="' . $email_address . '">
<input type="hidden" name="password" id="login-password" value="' . $pass . '">
<input type="image" src="' . $place_order_button . '">
</form></div>


to


<div align="center"><form target="_blank" name="login" action="' . $login_as_customer . '" method="post">
<input type="hidden" name="firstname" id="firstname" value="' . $c_firstname . '">
<input type="hidden" name="lastname" id="lastname" value="' . $c_lastname . '">
<input type="hidden" name="email_addr" id="login-email-address" value="' . $email_address . '">
<input type="hidden" name="password" id="login-password" value="' . $pass . '">
<input type="hidden" name="securityToken" id="securityToken" value="' . $_SESSION['securityToken'] . '">
<input type="image" src="' . $place_order_button . '">
</form></div>


But still get the same problem...

Any idea?

sanji
27 Dec 2007, 13:33
#14
jmeca avatar

jmeca

New Zenner

Join Date:
Nov 2006
Posts:
44
Plugin Contributions:
0

Re: Login as Customer module [Support Thread]

This is wonderful. Thank you very much for your help.:yes:
Anybody know if are there any contribution i can modify existences in stock whitout have to edit de article like an erp.

Happy new year to every body.
27 Dec 2007, 23:39
#15
sanji avatar

sanji

Zen Follower

Join Date:
Jan 2005
Posts:
138
Plugin Contributions:
0

Re: Login as Customer module [Support Thread]

As I said for me, this is NOT working, so if you have any suggestion...

sanji
29 Dec 2007, 00:43
#16
vmmeup avatar

vmmeup

New Zenner

Join Date:
Nov 2007
Posts:
58
Plugin Contributions:
1

Re: Login as Customer module [Support Thread]

I have done this in my new version1.2 which should be availble from the downloads soon. I have it available for download off of the demo site located at http://www.vmitek.com/zencart/

SSL Demo Site located at http://www.virgintattoos.com/zencart/

Thanks for the suggestion, I was planning on doing that, just wanted to do some testing before I released it.
29 Dec 2007, 00:48
#17
vmmeup avatar

vmmeup

New Zenner

Join Date:
Nov 2007
Posts:
58
Plugin Contributions:
1

Re: Login as Customer module [Support Thread]

Sanji what version on ZenCart are you running? I have yet to test with the latest 1.3.8, but I made some mods that might help you if you are running 1.3.7. I hope to test and tweak for 1.3.8 soon.

My latest version 1.2 should be available for download soon, but you can download it at the demo site http://www.vmitek.com/zencart/

Please let me know if this works for you.
29 Dec 2007, 00:52
#18
sanji avatar

sanji

Zen Follower

Join Date:
Jan 2005
Posts:
138
Plugin Contributions:
0

Re: Login as Customer module [Support Thread]

Hi vmmeup,

I am running the latest 1.3.8a. Obviously, the problem comes from the $_SESSION['securityToken'] information, but I couldn't pass it to the login page so far - and that's why it is not working directly, I get the Security Error message. If I just click again on "login" - the password is already filled in - then the connection proceeds...

sanji
29 Dec 2007, 01:00
#19
vmmeup avatar

vmmeup

New Zenner

Join Date:
Nov 2007
Posts:
58
Plugin Contributions:
1

Re: Login as Customer module [Support Thread]

If any has trieds this on a server with register globals = 0ff please let me know I have no control over this with my provider and cannot test but would like to code it to work if they are on or off. If it doesn't work any guidance as to how I can change the code to allow for it to work woth them off would be appreciated as well.

Thanks,
Sid
29 Dec 2007, 01:02
#20
vmmeup avatar

vmmeup

New Zenner

Join Date:
Nov 2007
Posts:
58
Plugin Contributions:
1

Re: Login as Customer module [Support Thread]

Sanji,

I think I can fix that.....I'm in the process of setting up a 1.3.8 site so I will tweak to get it to work.....

Thanks,
Sid