I have a product page in which users can log in, for example, on the facebook page on the site and get a discount for this.
Everything works fine for me, except that the mini-login.phtml file redirects the user to the account page.
Ideally, after logging in, the user is redirected to the page on which he was included. So that they can instantly click the "facebook like" button after logging in.
I tried adding this code to the login form, did nothing.
<form action="<?php echo str_replace('login', 'loginPost', $this->helper('customer')->getLoginUrl()) ?>" method="post">
Is there a short code that will allow me to redirect users to the same page on which they were included at login?
source
share