File tree Expand file tree Collapse file tree 3 files changed +19
-16
lines changed
app/code/Magento/Persistent/Controller/Index Expand file tree Collapse file tree 3 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ class ExpressCheckout extends Index
18
18
public function execute ()
19
19
{
20
20
$ this ->messageManager ->addNotice (__ ('Your shopping cart has been updated with new prices. ' ));
21
+ /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
21
22
$ resultRedirect = $ this ->resultFactory ->create (ResultFactory::TYPE_REDIRECT );
22
23
$ resultRedirect ->setPath ('checkout/cart ' );
23
24
return $ resultRedirect ;
Original file line number Diff line number Diff line change @@ -25,8 +25,9 @@ public function execute()
25
25
$ this ->quoteManager ->setGuest ();
26
26
}
27
27
$ checkoutUrl = $ this ->_redirect ->getRefererUrl ();
28
+ /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
28
29
$ resultRedirect = $ this ->resultFactory ->create (ResultFactory::TYPE_REDIRECT );
29
- $ resultRedirect ->setPath ($ checkoutUrl . (strpos ($ checkoutUrl , '? ' ) ? '& ' : '? ' ) . 'register ' );
30
+ $ resultRedirect ->setUrl ($ checkoutUrl . (strpos ($ checkoutUrl , '? ' ) ? '& ' : '? ' ) . 'register ' );
30
31
return $ resultRedirect ;
31
32
}
32
33
}
Original file line number Diff line number Diff line change 10
10
11
11
class UnsetCookie extends Index
12
12
{
13
+ /**
14
+ * Unset persistent cookie action
15
+ *
16
+ * @return \Magento\Framework\Controller\Result\Redirect
17
+ */
18
+ public function execute ()
19
+ {
20
+ if ($ this ->sessionHelper ->isPersistent ()) {
21
+ $ this ->cleanup ();
22
+ }
23
+ /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
24
+ $ resultRedirect = $ this ->resultFactory ->create (ResultFactory::TYPE_REDIRECT );
25
+ $ resultRedirect ->setPath ('customer/account/login ' );
26
+ return $ resultRedirect ;
27
+ }
28
+
13
29
/**
14
30
* Revert all persistent data
15
31
*
@@ -25,19 +41,4 @@ protected function cleanup()
25
41
$ this ->sessionHelper ->getSession ()->removePersistentCookie ();
26
42
return $ this ;
27
43
}
28
-
29
- /**
30
- * Unset persistent cookie action
31
- *
32
- * @return \Magento\Framework\Controller\Result\Redirect
33
- */
34
- public function execute ()
35
- {
36
- if ($ this ->sessionHelper ->isPersistent ()) {
37
- $ this ->cleanup ();
38
- }
39
- $ resultRedirect = $ this ->resultFactory ->create (ResultFactory::TYPE_REDIRECT );
40
- $ resultRedirect ->setPath ('customer/account/login ' );
41
- return $ resultRedirect ;
42
- }
43
44
}
You can’t perform that action at this time.
0 commit comments