Created
August 16, 2013 17:57
-
-
Save pierreandreroy/6252042 to your computer and use it in GitHub Desktop.
Call Magento model (function) from an external file.
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 | |
//include Magento app | |
require_once 'app/Mage.php'; | |
//initialize Magento | |
Mage::app(); | |
//call Magento model or functions (this example get unsubscription link for customer) | |
$email = "test@test.com"; | |
$unSubLink = Mage::getModel('newsletter/subscriber')->loadByEmail($email)->getUnsubscriptionLink(); | |
echo $unSubLink; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment