Cart session data -- I'm not seeing it |
[eluser]jbibbings[/eluser]
I am trying to figure out how CI saves its cart session data to the database. I am expecting to see some information called 'cart_contents' in the user_data field. I have set up the ci_sessions table as outlined in the Session docs, and have the sessions saving to the DB. I am using CI Version 2.0, PHP 5.2, MySQL 5.1.37 I have set up a test controller like so: Quote:<?php I have set up a view just to display the cart data like so: Quote:<h1>Yeah whatever</h1> The items I have saved to the cart, are correctly displaying in the view. However, I do not see them in the ci_sessions table. A typical entry in the user_data field looks like this: Code: a:2:{s:15:"flash:old:token";s:32:"302c1c0076988d68bd5382f9a016e3d2";s:15:"flash:new:token";s:32:"15ba88063f8cd4567c3b34306c584cbf";} There is no cart_contents information here so I am unsure - where is CI storing all of this data? Am I crazy?
[eluser]Eric Barnes[/eluser]
I just tried to duplicate this with the latest and didn't have any problems. Can you try downloading the tip from bitbucket? https://bitbucket.org/ellislab/codeignit...839eaf.zip
[eluser]jbibbings[/eluser]
Ok thanks, yeah. It is working now. The cart_contents data is saved in the DB, and looks like normal. I found this issue in a fork of the "Community Cart" project. It appears to use the core Cart.php library. It is really strange because I can use cart->insert() and cart->contents() to save and view the data, but I have no idea where this data is actually being stored... |
Welcome Guest, Not a member yet? Register Sign In |