Add cookie reset if id_transaction is different
This commit is contained in:
parent
85f4874ac8
commit
588898123a
@ -48,6 +48,14 @@ class OrderConfirmationController extends OrderConfirmationControllerCore
|
||||
|
||||
// Cookie
|
||||
global $cookie;
|
||||
// Reset
|
||||
if (isset($cookie->id_transaction)) {
|
||||
if ($cookie->id_transaction != $order->id) {
|
||||
unset($cookie->id_transaction);
|
||||
unset($cookie->transCpt);
|
||||
}
|
||||
}
|
||||
// Set counter
|
||||
if (isset($cookie->transCpt)) {
|
||||
$transCpt = (int) $cookie->transCpt;
|
||||
}
|
||||
@ -71,6 +79,7 @@ class OrderConfirmationController extends OrderConfirmationControllerCore
|
||||
|
||||
// Write cookie
|
||||
$cookie->transCpt = $transCpt;
|
||||
$cookie->id_transaction = $order->id;
|
||||
$cookie->write();
|
||||
|
||||
self::$smarty->assign(
|
||||
|
Loading…
Reference in New Issue
Block a user