我正在为我的网站使用gocart(CI)2.2.1版本。我已经构建了它。现在我面临一个非常大的问题。
我正在将会话保存到数据库。
$config['sess_use_database'] = TRUE;
在我遇到问题之前的几天,我在搜索解决方案后随时退出登陆时发现这是一个CI会话问题,并且在Gocart 2.2.1版中,但后来我使用了{{3}的第5个回答然后我意识到现在我没有从任何页面退出,而只在一个案例中发生。
我在结帐控制器上执行结算,付款功能,在完成订单后,我将用户重定向到 thankyou 页面(“checkout / thankyou”)。
在订单保存在db。
中时,不会进入thankyou页面,而是让我注销以下代码我正在使用
if($status=="success"){
redirect('checkout/thankyou');
}
function thankyou(){
/* get last order of customer */
$customer = $this->go_cart->customer();
if(empty($customer)){
redirect('');
}
$order_noA = $this->Customer_model->customer_last_order($customer['id']);
if(empty($order_noA) || $order_noA[0]==""){
redirect('');
}
else{
/* remove the cart from the session */
$this->go_cart->destroy();
$data['order_number'] = $order_noA[0]->order_number;
$this->load->view('thankyou',$data);
}
}
如果仍然是CI(Gocart)会话的问题,那么为什么它只在此页面上注销。
请帮助我们解决这个问题。
提前致谢!