2

I'm using Checkout Login module that adds an inline login form to the account information checkout pane. No anonymous users have to activate their accounts to complete checkout or payment, which is all I want. However, after the PayPal redirects users back to my site, and users try to access the order (order history) page, the following message appears:

You are not authorized to access this page.

Is there a way I can re-direct users to login page when they try to access the order page, rather than the above message appearing?

In short, I want my users to be redirected to login page when they try to access order (order history) page, but not when they try to checkout.

2 Answers 2

3

That's one of the main features of the LoginToboggan module.

enter image description here

When the Present login form on access denied (403) is enabled in its setting form, any access denied page will display a login page. Upon login, users are redirected back to the previously requested path.

0
1

Yes, You can handle it with Rules, create a rule in admin/config/workflow/rules/reaction/add and in react on event select commerce order is view (or completing the checkout process) then add condition that if user not logged in on action Redirect user to login page.

1
  • Thanks zhilevan for the advice. I forgot to mention that I also want my users to be redirected to the same 'order history' page once they log in. The module: LoginToboggan did the job for me .. Commented Nov 17, 2015 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.