Magento get info newsletter subscribe


You want get info newsletter subscribe of account logged, you can check that account have subscribed or not.
Below is code get info subscribe of customer from email address.

You can see:

if(Mage::getSingleton('customer/session')->isLoggedIn()){ //check if logged
	$email = Mage::getSingleton('customer/session')->getCustomer()->getData('email'); //get email of current account
	$subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email); //get data by that email
		echo '<pre>';
		echo '</pre>';


Thanks for watching!

About Author

Là một developer rất ham chơi nhưng không ham hố, không ham chơi nhưng rất thích cầm đầu...

Comments are closed.

%d bloggers like this: