Zen Cart Logo
Forums / General Questions / Sign-on from another website?

Sign-on from another website?

Views: 892

Results 1 to 2 of 2
27 Jun 2014, 10:23 AM
#1
rob_musquetier avatar

rob_musquetier

New Zenner

Join Date:
May 2011
Location:
The Netherlands
Posts:
4
Plugin Contributions:
0

Sign-on from another website?

I am trying to setup a single sign-on from our main website which should also take care of the sign-on into Zencart. What should I do to ensure when users logon and then go to our shop (www.ncrs.org/shop) are logged in the shop as well?

Is there an API I can use. I've tryed to start a session using the session functionality of ZenCart:
    include_once('shop/includes/functions/functions_general.php');
    include_once('shop/includes/init_includes/init_sessions.php');
    zen_session_start();
But this does not seems to work...

I have also tried to set the cookie variable zenid and session variables customer_id and customer_ip_address and inserted a corresponding row in the sessions table with the session ID and expire time (time() + (365*24*3600)) although I don't know what to fill into the value column.
30 Jun 2014, 3:59 PM
#2
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Sign-on from another website?

Rob-

Although this isn't a "simple" solution and you will want to make sure it passes PCI compliance, you would modify the "Admin Login As customer" module. To access zencart. And then pass the users email address into zencart with a token of some sort to verify they are ok to access their account.