Adding popup into login page.

Adding a popup into login page of Ecommerce website for specific customer.

loginpopup: function() {
    var layout = this.application.getLayout();
    var modalView = new PopupView({
        items: "itemsToAddToModal"
    });
    modalView.render();
    layout.showInModal(modalView);
},

It’ll render a Popup into Login page when customer tries to login into his/her account.

This loginpopup function will call the event in the login file just after clicking into Login button in the login page. And layout variable will get the layout from the global application, and modelView variable will create a new popup and item object add the items into it. modelView.render() here render() function will generate a popup and rendered into the screen and layout.showInModel will show popup a screen into top of the page.

This will needs to add in the LoginRegister_login_View.js file

Leave a comment

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