Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.

How to login from outside of cart

Locked
This thread is locked. New replies are disabled.
9 Jul 2008, 5:00 PM
#1
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Post #1 by jrm213

Hi,

I am working on a site built in wordpress and have integrated zen cart into the design in such a way as follows

http:\siteurl is the wordpress url
http:\siteurl\shop is the zen cart url

The site allows login and zen cart has a login. I want to combine the login so that when a user is on http:\siteurl they can enter e-mail and password in the html header, click submit, and be redirected to their site account page and it also logs them into zen cart.

The problem I am running into is with $_SESSION['securityToken'], I can't get this set to a proper value, so I always get "There was a security error when trying to log in." message when I am not in a http:\siteurl\shop directory.

Does anyone know a way to do this? I know that $_SESSION['securityToken'] is set in sessions.php but sessions.php requires that isAdminFlag be defined, and that appears to be defined in application_top.php but requiring application_top.php errors my page out.

Any help is greatly appreciated. I would really hate for my customers to have to log into their account and log into the store seperately.

Thanks for any input!

9 Jul 2008, 5:22 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #2 by stevesh

If you can make this work, you'll be an instant Zencart hero.

So far as I know, the only working Zencart bridge available is for phpBB version 2.

17 Jul 2008, 5:52 PM
#3
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Post #3 by jrm213

I did work this out, but i am not completely happy with how it works. I will post more after some more testing. I haven't tied the store login into wordpress login, but into the login for the wordpress site, there are really 3 potential logins.

  1. The Site
  2. The Cart
  3. Wordpress

Right now the idea isn't to use wordpress as a blog but as a content management system so the site owners can modify static page content without knowing any html. So there is no need for anyone but them to log into wordpress. Though using the method I implemented it should work to log into anything that you can call the login functions for.

18 Jul 2008, 3:57 PM
#5
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Post #5 by jrm213

I did, but it doesn't do what I want unless I am not understanding it. I am using wordpress to create the site, and the zen-cart is in a subdirectory.

So it is https://www.oururl.com as the main wordpress site, and www.oururl/shop as the zencart shopping cart.

The site is much more than just a cart, and the people who own the site need to be able to modify the content of the site and they don't have any html experience, let alone php experience. So the main site CMS is wordpress and they can log in and change the content.

We don't want users of the cart to be logged in as wordpress users. We do want users of the cart to be logged in as site users, as the site also provides a way for the user to manage the products they purchase through the site or at a physical store by utilizing web services. So the mandate is that one login from the header of the site needs to log the user both into the site and into the cart.