I am looking to show a custom message to customers who subscribed to newsletter on the checkout confirmation page on our magento site but I am not able to check the subscription status using the following method in success.phtml
:
<?php
$customerSession = Mage::getSingleton("customer/session");
$email = $customerSession->getCustomer()->getEmail();
$subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email);
$status = $subscriber->isSubscribed(); // status should be 1 if subscribed.
Can anyone help?