I have an observer on the customer login event. I want to redirect the user to the cart page after login.

I have this in my function from my controller:


The fact is that in firefox this code works. In chrome it doesn't. In chrome I always get an empty cart , even if I have products in my cart, just after page refresh I got the items from my cart. What should I change in my code to make this work in chrome too ? Thank you in advance !.

1 Answer 1


Try this with removing some '/'

  • If I change /checkout/cart into checkout/cart, so without the first "/" , I am redirected to customer/account page :| Nov 15, 2016 at 9:01
  • @AttilaNaghi, Now check my updated answer Nov 15, 2016 at 9:06
  • Still the same on chrome :( . My project is on a subdomain. so my url is like test.servername.io/checkout/cart. I don't know if this is a problem or not .. Nov 15, 2016 at 9:09
  • @AttilaNaghi, It may be the browser issue. Check in other system or in some other browsers. Nov 15, 2016 at 9:43

Your Answer

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

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