APIs SuiteCommerce Extensibility Frontend LoginRegister().

LoginRegister()

Description

The LoginRegister component lets you create listeners for events that occur on the Log In / Register page in a web store. It also lets you capture additional information from the login or register form when a web store visitor logs in or registers.

You can listen for the following events on the Log In / Register page. The ‘before’ events let you interrupt the login or registration process, do something else (such as validate input data or call an external API), and depending on the outcome, either cancel the event or let the event complete.

  • beforeLogin – A cancelable event that occurs before login is completed.
  • beforeRegister – A cancelable event that occurs before registration is completed.
  • afterRegister – A cancelable event that occurs after registration is completed.

To capture field input from the login or registration forms, the LoginRegister component utilizes placeholders in the default base theme templates. The placeholders are positioned below the last field in each form. Here are the template files in which you can find the relevant placeholders:

Form	    Template File	              Placeholder
Login	    login_register_login.tpl	  <div data-view="Login.CustomFields"></div>
Register	login_register_register.tpl	  <div data-view="Register.CustomFields"></div>

Get an instance of this component by calling container.getComponent("LoginRegisterPage");

Note: This class has no methods.

Leave a comment

Your email address will not be published. Required fields are marked *