mccoy81 Posted October 11, 2013 Share Posted October 11, 2013 Hey everyone, I am having an issue with the cookie situation on the shopping cart and wish list pages. They work fine when it comes to adding items to the cart and moving them back and forth between the cart and wish list. The problem comes when I try to access the cart directly, without adding or updating or moving. It is using the same cookie for the other actions but if I go to the cart on its own it redirects me to an empty one. I figured out that it was a cookie problem as I had it echo the $uid instead of redirecting and I found that the cookie is different when you try to access the cart from the one that was created when you add an item to the cart. This is all happening without closing the browser so I am confused as to why it is not finding the $uid stored in the cookie and is instead creating a new one when I try to access the cart on its own. Any ideas? Link to comment Share on other sites More sharing options...
HartleySan Posted October 11, 2013 Share Posted October 11, 2013 Without displaying some code, we can't really help. Have you tried doing print_r($_COOKIE) to see what cookies are actually present? Link to comment Share on other sites More sharing options...
mccoy81 Posted October 11, 2013 Author Share Posted October 11, 2013 Yah sorry, I figured it out though. Some of the urls had www and some didnt that was storing different cookies. I am having one other problem that you might be able to help me with. I am using the Paypal REST api system, The sending and receiving from that is working fine. The problem I am having is that it seems as though my $_SESSION variables are disappearing when I am redirected back from Paypal. I am getting a undefined variable error when attempting to use the Session variables on the page the customer is redirected to. I need the session variable $_SESSION['order_id'] so I can retrieve the transaction id (stored in the db) to execute the payment. Any ideas? Link to comment Share on other sites More sharing options...
HartleySan Posted October 11, 2013 Share Posted October 11, 2013 I think PayPal may return that information when the order is completed. but either way, try the print_r($_SESSION) trick and see if that sheds any light on the situation. Link to comment Share on other sites More sharing options...
Recommended Posts