From d6de6fdaef36714007fcf4787ec0d29364a9b8c1 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 15 Dec 2023 10:25:02 +0800 Subject: [PATCH] * Fix bug #41563, reset preBranch if current product and previous prodcut is not the same. --- module/product/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index aa098516b2..fe19695643 100755 --- a/module/product/model.php +++ b/module/product/model.php @@ -1311,8 +1311,6 @@ class productModel extends model $this->session->set('product', $productID, $this->app->tab); - helper::setcookie('preProductID', (string)$productID); - /* If preProductID changed, then reset preBranch. */ if($this->cookie->preProductID != $this->session->product) { @@ -1320,6 +1318,8 @@ class productModel extends model helper::setcookie('preBranch', '0'); } + helper::setcookie('preProductID', (string)$productID); + return $productID; }