Answer the question
In order to leave comments, you need to log in
How to return the user after authorization back to the product page?
Good afternoon Toaster!
The essence of the problem: the user (hereinafter referred to as "P") is on the product page (a certain substance that can be downloaded only after authorization), P clicks on "download" and a model window pops up that says that you need to download it, or log in, or register. P selects something from the above and gets to the corresponding page. Advise if it is possible from the Front End to return P back to the product?
Thank you.
Answer the question
In order to leave comments, you need to log in
From the Front End, you can simply not leave the product page.
If authorization or registration strictly requires a separate page, you can save the address of the current product page in any way (cookie, LocalStorage, SessionStorage, IndexedDB &c. &c.) and then change the current address to the remembered one using the script.
Save in localStorage or sessionStorage a link to this product. After authorization / registration, check if there is a saved link, then redirect the user there, otherwise nothing.
Well, either as an option to drag the GET redirecturl parameter with you
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question