External Site

The company I work for is trying to rebuild our full website. We have a master account system already so we don't want to use the built in account system. We are also interested in wrapping a Codeigniter framework around the store for other features on our existing site.

Right now I have it where I can log the user into the store via the Auth API, but I am unsure how to get access to the store session. I have two issues here.

  1. CS-Cart is in /shop, so the session cookie path is /shop. This makes it hard to get a hold of the current shop user.

  2. The session cookie name is sid_customer_#####. I am not sure how this is being generated.

    Is there any way to get this information, or is there a better way to do this? Also is it possible to overwrite the login/registration system with an add-on? We would like the user to sign into our master account system which would then sign them in via the Auth API.

You can review the Session.php class in app/Tygh/Session.php. You can then look at how the session cookie is named and possibly how to adjust to meet your needs. Unfortunately there aren't any hooks in the Session class so any changes you make will be overwritten upon upgrade.

Thanks, for your input. Would there be a way to create a second cookie while the auth api is being ran to create another session like cookie for the external site?

That I don't know. I don't use the API much so I'm not one to be able to advise in detail. Valli is probably the most familiar with its use from what I've seen around here.