How to check email aleady exist using ajax in magento 2
Controller Email.PHP ` public function execute() { $customerEmail=$this->getRequest()->getParam('email'); $objectManager=MagentoFrameworkAppObjectManager::getInstance(); $CustomerModel = $objectManager->create('MagentoCustomerModelCustomer'); $CustomerModel->setWebsiteId(1); $CustomerModel->loadByEmail($customerEmail); $userId = $CustomerModel->getId(); if ($userId) { return 1; } else { return 0; } }` j Query jQuery(function() { var emailAddress = jQuery('#email_address'); emailAddress.on("change", function ()…