# Checkout redirect after login

**URL:** <https://forum.modmore.com/t/checkout-redirect-after-login/298>\
**Category:** SimpleCart\
**Created:** [April 27, 2016, 8:23am UTC](https://forum.modmore.com/t/checkout-redirect-after-login/298 "2016-04-27T08:23:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timcross](https://forum.modmore.com/user_avatar/forum.modmore.com/timcross/32/239_2.png) [@timcross](https://forum.modmore.com/u/timcross)\
**Post date:** [April 27, 2016, 8:23am UTC](https://forum.modmore.com/t/checkout-redirect-after-login/298/1 "2016-04-27T08:23:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![PMedusa](https://forum.modmore.com/letter_avatar_proxy/v4/letter/p/ee7513/32.png) [@PMedusa](https://forum.modmore.com/u/PMedusa)\
**Post date:** [April 27, 2016, 9:59am UTC](https://forum.modmore.com/t/checkout-redirect-after-login/298/2 "2016-04-27T09:59:36Z")

</div>

Hi Tim,

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

[https://rtfm.modx.com/extras/revo/formit/formit.formitretriever](https://rtfm.modx.com/extras/revo/formit/formit.formitretriever)

---

<div class="post-metadata">

**Author:** ![timcross](https://forum.modmore.com/user_avatar/forum.modmore.com/timcross/32/239_2.png) [@timcross](https://forum.modmore.com/u/timcross)\
**Post date:** [April 27, 2016, 10:17am UTC](https://forum.modmore.com/t/checkout-redirect-after-login/298/3 "2016-04-27T10:17:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![PMedusa](https://forum.modmore.com/letter_avatar_proxy/v4/letter/p/ee7513/32.png) [@PMedusa](https://forum.modmore.com/u/PMedusa)\
**Post date:** [April 27, 2016, 12:54pm UTC](https://forum.modmore.com/t/checkout-redirect-after-login/298/4 "2016-04-27T12:54:17Z")

</div>

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. 😕

let us know how to solve  
Sorry about my poor English

---

<div class="post-metadata">

**Author:** ![robh76](https://forum.modmore.com/letter_avatar_proxy/v4/letter/r/ecb155/32.png) [@robh76](https://forum.modmore.com/u/robh76)\
**Post date:** [October 19, 2016, 4:52pm UTC](https://forum.modmore.com/t/checkout-redirect-after-login/298/5 "2016-10-19T16:52:53Z")

</div>

Hi Tim,

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

Thanks  
Rob
