Merge remote-tracking branch 'origin/tickets/customer_date_upd'
This commit is contained in:
commit
9115434424
@ -246,6 +246,17 @@ class FrontController extends FrontControllerCore
|
|||||||
// @Override Antadis - prevent double fb tracking on registration if customer already exists
|
// @Override Antadis - prevent double fb tracking on registration if customer already exists
|
||||||
if ($cookie->isLogged()) {
|
if ($cookie->isLogged()) {
|
||||||
$customer = new Customer((int)$cookie->id_customer);
|
$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);
|
$accountCreationDateTime = new DateTime($customer->date_add);
|
||||||
$nowDateTime = new DateTime();
|
$nowDateTime = new DateTime();
|
||||||
$maxTrackingDateInterval = new DateInterval('PT5S'); //5 seconds
|
$maxTrackingDateInterval = new DateInterval('PT5S'); //5 seconds
|
||||||
|
Loading…
Reference in New Issue
Block a user