Avatar of christamcc
christamccFlag for United States of America asked on

Session Solution Needed

I have a site with two different sections, which are basically two different eCommerce solutions.  One, the "Shop", is robust and requires a log-in to an account  to order.  The other, "Subscribe", is just a simple add to cart and checkout store with no log-in required.

My issue is the sessions. The Shop controls the sessions (starts them when the site loads, destroys and starts again upon log-in, and destroys them at checkout/logout).  The simple Subscription cart uses session for order id and cart id. (The Sub cart is not affecting the session, as it just unsets the order_id and cart_id session only after checkout.)

So of course if someone jumps around and say logs into the Shop after adding something to their Subscription cart, then the Subscription cart loses the the cart id.

What would you suggest I do to allow the Subscription Cart to function more independently?
PHP

Avatar of undefined
Last Comment
christamcc

8/22/2022 - Mon
Ray Paseur

Uhh, maybe change the name of the variables that are used to store the session data?  Why is there any motivation to destroy the sessions?  Just unset() the information that is not wanted any more.
SOLUTION
QuinnDex

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
christamcc

The comments made me think about the problem a little differently. Though "Uhh, maybe change the name of the variables that are used to store the session data?" implies that this is an obvious solution. Please do not assume anything is obvious to a non-expert asking questions on this site.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23