Checkout redirect after login

Hi Mark

I’ve made a checkout page secure, and you have to login in to view.

After clicking checkout, from the cart page, it shows the login page if you are not logged in.

Now, after logging in, it doesn’t redirect to the checkout page, it goes back to the cart page.

Do I need to pass parameters through, from the login page to the checkout page?

Thanks

Tim

Hi Tim,

in your CheckoutForm chunk there is this code? [[!FormItRetriever? &redirectToOnNotFound=[[*parent]]]]

https://rtfm.modx.com/extras/revo/formit/formit.formitretriever

Hi Paolo

Yes, I do have this, but I wanted to keep it in case the cart is empty.

Is there a way of sending parameters from the login page back to FormItRetriever?

Or, I was thinking of manually creating a snippet that checks if the cart is empty, then redirects back to the cart if the checkout page is accessed (thus removing FormItRetriever). Do you know what cart/checkout code I can use for that?

Thanks

Tim

Hi Tim,

maybe you can use emptyTpl property (The chunk name used when the cart is empty) of scGetCart snippet to check if the cart is empty.
With Login extra I don’t know, maybe with postHooks and snippet which store data as FormIt would, but it seems complicated. :confused:

let us know how to solve
Sorry about my poor English

Hi Tim,

Did you ever find a solution for this? - I have the same question…

Thanks
Rob