As a registered customer, when trying to access your cart from an abandoned cart email, after being directed to the login page, rather than going to your cart, you are instead redirected to the customer account page. Please note that this is not related to the configuration option, "Redirect Customer to Account Dashboard after Logging in."
Preconditions
Magento Commerce 2.2.6
PHP 7.1.22
MySQL Ver 14.14
Dotmailer (any version)
Steps to reproduce
Ensure that the configuration option "Redirect Customer to Account Dashboard after Logging in" is set to "No"
Trigger an abandoned cart email from a logged-in user's quote.
Login as a user
Add items to your cart
Important: Logout of the customer account
After you receive an abandoned cart email, click on the link in the email: "Take Me To My Basket"
The method call ought to be set to setBeforeAuthUrl() instead of the setAfterAuthUrl() method.
This is because of how \Magento\Customer\Model\Account\Redirect::prepareRedirectUrl() works.
In that core method, since the before_auth_url is not set, it sets $url to the same value as $baseUrl. Then, the rest of the code never accesses the after_auth_url value.
As a registered customer, when trying to access your cart from an abandoned cart email, after being directed to the login page, rather than going to your cart, you are instead redirected to the customer account page. Please note that this is not related to the configuration option, "Redirect Customer to Account Dashboard after Logging in."
Preconditions
Steps to reproduce
Expected result
Actual result
Additional Details