Developer forum

Forum » CMS - Standard features » Passing GoBackToPage around in the Swift user address manager

Passing GoBackToPage around in the Swift user address manager

Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hello.

When using the swift checkout, and the user has no delivery addresses, you can navigate to the administer addresses page from the checkout, which tacks on a ?GoBackToPage=idOfPage

I want to retain this ID, so I can have a " Go Back To Checkout " or simply "Go Back" link, depending on which page I have come from ( you can get to that page from several places, not just the checkout ).

So I use the ID to look up the page and then decide how the link should look.

Problem is, the GoBackToPage request string gets wiped out by the post to manageaddresses. I created a new hidden field in the form ot preserve it, but it disappears ( I cannot find it in the Request object after the form is posted. I also see that it is already in the swift templates, but it seems to disapear. the request["GoBackToPage"] key is not set when returning from the form post

 

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Stephen

Yes, I see the issue. I have not better solution that to put that value in a session variable and if it is there, use it for the redirect. If a new valid value is in the request, the session value can then be overridden...

BR Nicolai

 

You must be logged in to post in the forum