ECSHOP购物车关闭浏览器同时保存购物车商品

2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家

init.php 修改 if (!defined('INIT_NO_USERS'))   {             include(ROOT_PATH . 'includes/cls_session.php');       $sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));       define('SESS_ID', $sess->get_session_id());   } 为 if (!defined('INIT_NO_USERS'))   {             include(ROOT_PATH . 'includes/cls_session.php');       $sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));       //define('SESS_ID', $sess->get_session_id());   } 在最下面加 if($_COOKIE['randnumber']==""){        setcookie("randnumber",rand(0,1000),time()+86400);     } define('SESS_ID', md5($_COOKIE['randnumber'].real_ip()));