Created
August 16, 2013 17:45
-
-
Save pierreandreroy/6251943 to your computer and use it in GitHub Desktop.
Get list of newsletter template in Magento.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$template_info = array(); | |
$template_collection = Mage::getResourceSingleton('newsletter/template_collection'); | |
if(!empty($template_collection)){ | |
$cnt = 0; | |
foreach($template_collection as $template){ | |
$template_info[$cnt]['id'] = $template->getTemplateId(); | |
$template_info[$cnt]['code'] = $template->getTemplateCode(); | |
$cnt++; | |
} | |
}else{ | |
Mage::getSingleton('adminhtml/session')->addError('No templates found'); | |
return false; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment