I have made a custom plugin which disables article reviewing for unregistered users and instead of showing the input form there is a button „Review a product“ which is linked to Registration.
And what I want to know is:
How to redirect the user back to visited product after successfull registration?
the loginAction of the account controller takes two parameters. shopware/Account.php at 5.3 · shopware/shopware · GitHub
After succesful login, this is the page, where the user will be redirected to. If the two parameters ‚sTarget‘ (controller name) and ‚sTargetAction‘ are not set, the user gets redirected to the account page.
You can provide these two parameters to redirect where ever you like after the login.
Just wanted to add, that even though Michael Telgmann described it perfectly, you still could purchase/test a plugin-in the shopware store, which does the job for you.
Just in case you want to save yourself some work time.
You can provide these two parameters to redirect where ever you like after the login.
Michael Telgmann
Not exactly. You cannot redirect to a product detail because sTarget=detail and sTargetAction=index but the missing paramter sArticle=… gets ommited from the loginAction