Welcome Guest, Not a member yet? Register   Sign In
Another cart issue, please bare with me
#1

[eluser]eokorie[/eluser]
From the CI documentation, the cart class uses the CI Sessions and save cart information to the database. Been dealing with this all day with no adequate solution.. I have search the forums high and wide, read a few posts on similar issues but still no decent solution comes to mind. The problem I am facing here is that when the $config['sess_use_database'] is set to TRUE, no cart information is being saved. It so happens that CI just generates a new session id on every page load... very annoying to say the least. However when $config['sess_use_database'] is set to FALSE, the cart information is being saved properly (i.e. the current session is simply being update)...

Anyone experiencing this? I am using the latest version of Reactor downloaded from Git today. So its a bit strange that with use database sessions enabled, cart information is not saved but when its off, everything seems to work fine.

Can anyone help me out on this?

Thanks
#2

[eluser]cideveloper[/eluser]
What did you set your user_agent field to? The user guide on the site is wrong. You must set it to the below

Code:
user_agent varchar(150) NOT NULL

$config['sess_match_useragent'] in the config file is forcing a useragent check which when set to 50 is truncated and thus never matches and makes a new session. Alter your table to the above and it should work. It did for me.

I would also suggest setting user_data to medium text ass opposed to just text.

And if you do intend on using the carts class, not using database is bad since cookies can only hold so much data.
#3

[eluser]eokorie[/eluser]
Hi cideveloper,

That seems to have done the trick... surprising how the docs havent been updated to reflect this fact as I am sure a lot people would be having the same problem...

Big props to ya...


Thanks




Theme © iAndrew 2016 - Forum software by © MyBB