Created
June 28, 2012 05:07
-
-
Save drewgillson/3009230 to your computer and use it in GitHub Desktop.
Dg_Pricerulesextended GenerateController.php
This file contains hidden or 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
class Dg_Pricerulesextended_GenerateController extends Mage_Core_Controller_Front_Action | |
{ | |
public function promocodeAction() { | |
$helper = Mage::helper('pricerulesextended'); | |
$params = $this->getRequest()->getParams(); | |
$email = $params['email']; | |
$email = explode(',',$email); | |
$email = $email[0]; | |
$promo_value = Mage::getStoreConfig('pricerulesextended/promocode/dollarvalue'); | |
$promo_min = Mage::getStoreConfig('pricerulesextended/promocode/minpurchase'); | |
$helper->addPromoCode($email, $promo_value, $promo_min); | |
$this->_redirectUrl('/'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment