Cart always empty on www but able to add items on beta subdomain
Permalink
I'm a bit stumped here. We rebuilt our site as responsive on a "beta" subdomain. Looks great and everything pretty much works.
Now check this out. If I pointhttp://www.kristinit.com to that same beta_kristinit app, the site looks the same BUT I CANNOT ADD ITEMS TO THE CART. It always says "Your cart is empty." Whereas using it from beta.kristinit.com, I'm able to add items to carts no problem. Editing config/site.php has no effect.
Does not work:http://www.kristinit.com/products/silk-velvet-linda-dress/...
This will work:http://beta.kristinit.com/products/silk-velvet-linda-dress/...
Both urls are pointing to the same application, same files, same database, but cart only works on beta. Any ideas anyone?
Now check this out. If I pointhttp://www.kristinit.com to that same beta_kristinit app, the site looks the same BUT I CANNOT ADD ITEMS TO THE CART. It always says "Your cart is empty." Whereas using it from beta.kristinit.com, I'm able to add items to carts no problem. Editing config/site.php has no effect.
Does not work:http://www.kristinit.com/products/silk-velvet-linda-dress/...
This will work:http://beta.kristinit.com/products/silk-velvet-linda-dress/...
Both urls are pointing to the same application, same files, same database, but cart only works on beta. Any ideas anyone?
Ah, it was cookies -- I cleared cache data and everything BUT cookies. Thanks..
Also to note. If site is being viewed on non www and then the (SSL) Cart uses www then this will happen. I used .htaccess to force site to www and this was resolved.
Note: If you add items to the cart on beta, they will not show up in your cart on www, and vice versa. This is because each domain has an independent set of cookies and that's where the cart is stored, not in the database.