I have to hide the newsletter subscription form from customers who already subscribed.
For registered and loggedin customer i'm able to check the subscription status using the following method:
$customerSession = Mage::getSingleton("customer/session"); $email = $customerSession->getCustomer()->getEmail(); $subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email); $status = $subscriber->isSubscribed(); // status = 1 if subscribed.
But I want to hide it for guest customers also (obviously for that particular session alone).
How could I do that? Can anyone help?