60 \
Magento\Persistent\Helper\Data $persistentData,
61 \
Magento\Checkout\Model\Session $checkoutSession,
62 \
Magento\Customer\Model\Session $customerSession,
66 $this->_persistentData = $persistentData;
67 $this->_checkoutSession = $checkoutSession;
68 $this->_customerSession = $customerSession;
80 $stopActions = [
'persistent_index_saveMethod',
'customer_account_createpost'];
82 if (!$this->_persistentData->canProcess(
$observer)
83 || !$this->_persistentSession->isPersistent()
84 || $this->_customerSession->isLoggedIn()
89 $actionName =
$observer->getEvent()->getRequest()->getFullActionName();
91 if (in_array($actionName, $stopActions)) {
95 if ($this->_persistentData->isShoppingCartPersist()) {
96 $this->_checkoutSession->setCustomerData(
97 $this->customerRepository->getById($this->_persistentSession->getSession()->getCustomerId())
99 if (!$this->_checkoutSession->hasQuote()) {
100 $this->_checkoutSession->getQuote();
__construct(\Magento\Persistent\Helper\Session $persistentSession, \Magento\Persistent\Helper\Data $persistentData, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository)
execute(\Magento\Framework\Event\Observer $observer)