My first question:
After view cart etc., there is a button "continue shopping". if this button is clicked, i would like it goes to the last page of the shopping pages. if these is no shopping page visited during this current session, i would direct it to the index page of the shopping section.
The approach is:
I am thinking about for the shopping section pages, I will add codes to use session value to update and remember the current page (last page visited in the shopping section).
If the shopper goes to the page outside shopping section, no such codes will be used, and the session value will not be updated and remembered.
My Second Question:
If the client goes to log in page. I would like to remember the previous page he was in before he goes to the log in page. After the log in, there would be a button, "continue". If he clicked the continue, he would be directed to the previous page he was in before he goes to the log in page. Such as if he was in the "view cart" page he would be directed back to view cart page. If he was in the "check out" page, he would be directed back to the "check out" page.
Basically
1) for the shopping, I need the codes to set up the session value to remember current shopping pages.
2) for the log in, I need the codes to remember the previous page.
So they can continue from the right page later on.
Any existing codes for these tasks? Thank you.