Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4569792
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:16:12+00:00 2026-05-21T19:16:12+00:00

When I add something to the cart, the session can be seen immediately afterwards.

  • 0

When I add something to the cart, the session can be seen immediately afterwards. Once I am redirected to the cart view. The session is gone.

The stranger thing though, if I add something to the cart again, it updates the correct quantity… so obviously its still there.

I do not understand.

I am using CakePHP 1.3. I have a controller called CartsController with 2 views add and index. The add view expects a parameter of the id to add to cart. So when you go to carts/add/1 it adds product id 1 to the cart ($_SESSION) and then redirects you to the index view (/carts).

If you view the SESSION immediately after its added in the add() function before redirecting to the index view, it has the proper values in it. By the time you reach the index view, the session is empty again (well it has the default Cake Config value but nothing I added).

This would lead you to believe that somewhere in between when it gets added and after it gets redirected the session is being destroyed. But this is not true because if you added the item to the cart again, and view it directly afterwards again, it will show a higher quantity (2 now instead of 1, then 3 then 4 and so forth.) Yet if you view the session somewhere else, its not there.

Does anyone have any idea at all what could be happening here?


Update

I wanted to add, it DOES work as intended the first time you add something to the cart in your browser, but if you leave the site (via external link) with something in your cart and come back, there is nothing in your cart, and nothing can be added again — thats when the problems outlined above start. This is happening in Chrome, FF, IE.

Update2

If you want to see for yourself, steps to reproduce

  1. Go to
    http://216.119.150.158/john/products/1/simon-g-ring
  2. Click add to cart
  3. Click the Google Checkout button
  4. Click the Edit order link to return
    the previous page (not back button)

Your cart is now empty and you can’t add anything to cart again

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:16:13+00:00Added an answer on May 21, 2026 at 7:16 pm

    The first time you create a cookie for the HTTP connection, when you come back there is a second cookie for the HTTPS connection, which is only sent back to HTTPS connections. If you would access the page with the same protocoll (both time HTTP or both time HTTPS), you should see your shopping cart.

    Passing your session-cookie one time unsecure and one time secure can lead to security problems. I wrote an article about switching between HTTP and HTTPS protocoll:

    Switching between HTTP and HTTPS pages with secure session-cookie

    but maybe it’s easier to connect always with a secure HTTPS connection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On euroworker.no/order (add something to the cart with Kjøp and Handlevogn). I have a
I develop something like a shopping cart. I can select multiple items (by clicking
I have been working on a shopping cart that the user can add/remove order
If you add something to the xib file in an xcode project, you can
How can I add something like addCloseHandler to dialogbox that to close when click
I'm making a shopping cart for my website. When an user add something into
How to I add something to the .gitignore so that the match is not
When I set the GridLayout to the JPanel and then add something, it is
In the footer of my page, I would like to add something like last
I would like to do something like add a nice-to-Excel-functions Name property to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.