Skip to content

Redirect the customer to Previous Page after registration in Magento 2.4

I want to create one functionality for the customer registration process.

  • if registration is initiated from a particular page, then it should redirect to the same page after registration completion and show a success message on the page.
  • If the email is already registered, it should redirect to customer/account/login, by showing an error.

Any help is appreciated !!!