我正在使用magento默认通讯订阅者。我发现仅当订户在magento商店中有帐户时才会显示错误There was a problem with the subscription: This email address is already assigned to another user.
。如果订户是访客客户,则不会显示错误,将显示成功消息,说明已订阅时事通讯。如何在访客用户中显示消息。
答案 0 :(得分:1)
您应该编辑以下文件:
/app/code/core/Mage/Newsletter/controllers/SubscriberController.php
:
$status = Mage::getModel('newsletter/subscriber')->subscribe($email);
添加以下代码:
$emailExist = Mage::getModel('newsletter/subscriber')->load($email, 'subscriber_email');
if ($emailExist->getId()) {
Mage::throwException($this->__('This email address is already exist.'));
}