* Fix the problem of recording product cookies.

This commit is contained in:
tianshujie
2021-12-02 08:43:44 +08:00
parent fd0fb325fa
commit be83274876
+2 -1
View File
@@ -156,9 +156,10 @@ class productModel extends model
$this->session->set('product', (int)$productID, $this->app->tab);
if($productID && strpos(",{$this->app->user->view->products},", ",{$productID},") === false) $this->accessDenied();
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
}
setcookie('preProductID', (int)$productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
if($this->cookie->preProductID != $this->session->product)
{
setcookie('preBranch', 0, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);