0

I am using Codeigniter 3.1.9, and added items to my shopping cart, items are added and showing but when i put my system to hibernate mode with browser open, then after turning on my sytem, the cart shows 0 products. It should contain the item that i have added. Please help to sort out my issue. My add to cart code snippet is:

$data = array(
            'id'    => $product['id'],
            'qty'    => 1,
            'size'  => $size,
            'name'    => $product['title'],
            'image' => $product['image']
);
$this->cart->insert($data);

this is config file:

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
user3653474
  • 3,393
  • 6
  • 49
  • 135

1 Answers1

0

Codeigniter cart library save data in session. after hibernate, the session got destroy and your cart got cleared.