I tried to show a popup message
when customer tried to login. I add some code in LoginPost.php
like in code below but it's not work.
LoginPost.php :
try {
echo " <script type='text/javascript'>
alert('adadasd'); //This code i tried to popup a message
</script>";
$customer = $this->customerAccountManagement->authenticate($jsonObject[0]->EMAILOWNER, $jsonObject[0]->PASSWORDOWNER);
$this->session->setCustomerDataAsLoggedIn($customer);
$this->session->regenerateId();
setcookie("Role", $jsonObject[0]->ROLE, time() + (86400 * 30), "/");
if ($this->getCookieManager()->getCookie('mage-cache-sessid')) {
$metadata = $this->getCookieMetadataFactory()->createCookieMetadata();
$metadata->setPath('/');
$this->getCookieManager()->deleteCookie('mage-cache-sessid', $metadata);
}
How can i show a popup there? So the login will not continue before the customer click the popup message?