File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed
app/code/Magento/Persistent Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -410,4 +410,15 @@ private function getRequest()
410
410
}
411
411
return $ this ->request ;
412
412
}
413
+
414
+ /**
415
+ * Set `updated_at` to be always changed
416
+ *
417
+ * @return $this
418
+ */
419
+ public function save ()
420
+ {
421
+ $ this ->setUpdatedAt (gmdate ('Y-m-d H:i:s ' ));
422
+ return parent ::save ();
423
+ }
413
424
}
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public function execute(Observer $observer)
70
70
71
71
// Quote Id could be changed only by logged in customer
72
72
if ($ this ->_customerSession ->isLoggedIn () ||
73
- $ request && $ request ->getActionName () == 'logout ' && $ request -> getControllerName () == ' account '
73
+ $ request && $ request ->getFullActionName () == 'customer_account_logout '
74
74
) {
75
75
$ sessionModel ->save ();
76
76
}
Original file line number Diff line number Diff line change @@ -89,8 +89,10 @@ public function testSynchronizePersistentInfoWhenPersistentDataIsEnabled()
89
89
->method ('getRequest ' )
90
90
->will ($ this ->returnValue ($ this ->requestMock ));
91
91
$ this ->customerSessionMock ->expects ($ this ->once ())->method ('isLoggedIn ' )->will ($ this ->returnValue (false ));
92
- $ this ->requestMock ->expects ($ this ->once ())->method ('getActionName ' )->will ($ this ->returnValue ('logout ' ));
93
- $ this ->requestMock ->expects ($ this ->once ())->method ('getControllerName ' )->will ($ this ->returnValue ('account ' ));
92
+ $ this ->requestMock
93
+ ->expects ($ this ->once ())
94
+ ->method ('getFullActionName ' )
95
+ ->will ($ this ->returnValue ('customer_account_logout ' ));
94
96
$ this ->sessionMock ->expects ($ this ->once ())->method ('save ' );
95
97
$ this ->model ->execute ($ this ->observerMock );
96
98
}
Original file line number Diff line number Diff line change 29
29
<observer name =" persistent" instance =" Magento\Persistent\Observer\ApplyPersistentDataObserver" />
30
30
</event >
31
31
<event name =" controller_action_predispatch" >
32
+ <observer name =" persistent_synchronize" instance =" Magento\Persistent\Observer\SynchronizePersistentInfoObserver" />
32
33
<observer name =" persistent" instance =" Magento\Persistent\Observer\EmulateQuoteObserver" />
33
34
<observer name =" persistent_session" instance =" Magento\Persistent\Observer\RenewCookieObserver" />
34
35
<observer name =" persistent_quote" instance =" Magento\Persistent\Observer\CheckExpirePersistentQuoteObserver" />
You can’t perform that action at this time.
0 commit comments