I am using custom theme for my site, I bit stuck with newsletter subscription.
whenever I subscribe for news letter with same email id which is already subscribed, It should show the error, But I am not able to see any error message or success message in front end.
my subscribe.phtml code is
<form action="<?php echo $this->getFormActionUrl() ?>" method="post" id="newsletter-validate-detail" class="newsletter">
<div class="form-group has-feedback">
<input type="text" name="email" id="newsletter" title="<?php echo $this->__('I want to receive the specials') ?>" class="input-text required-entry validate-email form-control "/>
<button type="submit" class="newsletter_button form-control-feedback button"><?php echo $this->__('OK') ?></button>
</div>
</form>
<script type="text/javascript">
//<![CDATA[
var newsletterSubscriberFormDetail = new VarienForm('newsletter-validate-detail');
//]]>
</script>
and I also use this code to display the error, in subscribetionController
$emailExist = Mage::getModel('newsletter/subscriber')->load($email, 'subscriber_email');
if ($emailExist->getId()) {
Mage::getSingleton('core/session')->addError('Error sending mail');
//Mage::throwException($this->__('This email address is already exist.'));
}
I am not what is mistake here, But I am thinking I am not able to print the error message at front end,
Any suggestions, ? Help Me:) Thanks in advance..