After logging out from the account the user is redirected to a page that redirects to the CMS home page of magento.
I don't have that page and want to redirect to an external page instead.
But I can't find a clean way to change that redirect url to a page outside of magento.
I want to redirect to my page root whereas magento resides in https://www.mymagento.com/shop/
.
The redirect should lead to https://www.mymagento.com/
.
Add a comment
|
1 Answer
Override the logout phtml template and update the redirect url.
vendor/magento/module-customer/view/frontend/templates/logout.phtml:14
Change the $block->getUrl()
to the url where you want to be redirected.
$($.mage.redirect("<?php /* @escapeNotVerified */ echo $block->getUrl() ?>", "assign", 5000));
-
-
Yep, not the cleanest solution though but at least it works. Thanks.– sterosCommented Jul 17, 2017 at 9:02
-