D
D
Demian Levais2018-07-13 15:30:21
JavaScript
Demian Levais, 2018-07-13 15:30:21

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

4 answer(s)
B
Bhudh, 2018-07-13
@dlevais

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.

V
Viktor Yanyshev, 2018-07-13
@villiwalla

History API, location

A
Alexander Pashkevich, 2018-07-13
@Ankell

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.

A
alekssamos, 2018-07-13
@alekssamos

Well, either as an option to drag the GET redirecturl parameter with you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question