update date_upd to customer
This commit is contained in:
parent
62139fe9fd
commit
76eb16036b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user