Здесь приведен пример кода
в phtml
<script type="text/javascript">
oData.email = 'customeremail@domain.com';
jQuery.ajax({
url:postUrl,
type: "POST",
data: oData,
dataType: "json",
success:function(data) {
// here enable the password enter text field
}
});
</script>>
в ajax-контроллере
public function checkCustomerExistAction()
{
if ($this->isXmlHttpRequest()) {
echo 'Ajax Expired';
return;
$websiteId = Mage::app()->getWebsite()->getId();
$email = $this->getRequest()->getPost('email');
$customer = Mage::getModel('customer/customer');
$customer->setWebsiteId($websiteId);
$customer->loadByEmail($email);
// here check the customer exist or not
if ($customer->getId()) {
echo $customer->getId();
// here you can use your own logic
}
else {
echo '0';
}
}
}