Discussions

Login to Checkout

I need help trying to make sure a user is logged in before attempting to check out.

A few things I have noticed...

When a user is not logged in they can add items to the cart but will not be given the option to check out (I want this, but I know it can be set for anonymous).

When a user logs in, the items in the shopping cart are lost... unlike at amazon.com where it is added to the user's cart.

What is the best, user friendliest option to make it so that they can browse and add items to their cart, then log in before entering their payment and shipping info, and possibly create a user if they have yet to create one?

I appreciate the help.

PK

Posted: Sep 30, 2011

Comments

rfay Randy Fay on October 3, 2011

So the base idea is that an anonymous user who creates an order gets a new account right away. And that account contains their order.

However, when an anonymous user adds something to their cart and then logs in, the cart *is* retained. In fact, any cart they had before is replaced with the cart when they're logging in.

By default (with Commerce Kickstart) anon users do have the privilege to check out. It's the "Access checkout" privilege. You can grant it or not to anon users.

So it sounds to me like you have everything you need? The only difference here is that carts are not merged when logging in, but rather the anon cart comes with them.