When customer login on checkout page then redirect to cart page in magento2?
if they are login from others pages then redirect customer dashboard page.

  • Hie Jugal is there any update because i need same thing Jul 23, 2019 at 10:01
  • yes! I created a module for this. it tested and working fine Jul 24, 2019 at 3:43
  • great can you please share it. Jul 24, 2019 at 8:01
  • No thanks dear no problem i will create :) Jul 24, 2019 at 12:23
  • No problem i will provide free Jul 24, 2019 at 12:25

1 Answer 1



$response['redirectUrl'] = $this->url->getUrl('checkout/cart');


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.