diff --git a/override/classes/FrontController.php b/override/classes/FrontController.php index 86761487..0c575e84 100755 --- a/override/classes/FrontController.php +++ b/override/classes/FrontController.php @@ -246,6 +246,17 @@ class FrontController extends FrontControllerCore // @Override Antadis - prevent double fb tracking on registration if customer already exists if ($cookie->isLogged()) { $customer = new Customer((int)$cookie->id_customer); + + // Update date_upd + $lastVisit = DateTime::createFromFormat('Y-m-d H:i:s', $customer->date_upd); + $compare = new DateTime(); + $compare->add(new DateInterval('P5D')); + + if ($compare > $lastVisit) { + $customer->date_upd = date('YmdHis'); + $customer->update(); + } + $accountCreationDateTime = new DateTime($customer->date_add); $nowDateTime = new DateTime(); $maxTrackingDateInterval = new DateInterval('PT5S'); //5 seconds