Magento 欢迎发送包含订户折扣代码的电子邮件

Magento 欢迎发送包含订户折扣代码的电子邮件,magento,Magento,环境是Magento 1.7 基本上我想要实现的是,当用户订阅时事通讯时,系统会自动在他们的欢迎电子邮件中包含一个折扣代码。此折扣代码对每个帐户一次性使用 到处搜索,找到了最适合我要求的教程。根据我的理解,我们需要从模块配置中获取一些值,并使用帮助器发送一封带有优惠券代码的电子邮件 在代码的基础上,我做了一些修改: 1) 在文件中 app\code\core\Mage\Newsletter\controllers\SubscriberController.php $this->_redi

环境是Magento 1.7

基本上我想要实现的是,当用户订阅时事通讯时,系统会自动在他们的欢迎电子邮件中包含一个折扣代码。此折扣代码对每个帐户一次性使用

到处搜索,找到了最适合我要求的教程。根据我的理解,我们需要从模块配置中获取一些值,并使用帮助器发送一封带有优惠券代码的电子邮件

在代码的基础上,我做了一些修改:

1) 在文件中

app\code\core\Mage\Newsletter\controllers\SubscriberController.php
$this->_redirectReferer() in newAction()
app/code/community/Dg/Pricerulesextended/etc/config.xml
Pricerulesextended/Observer
之前

app\code\core\Mage\Newsletter\controllers\SubscriberController.php
$this->_redirectReferer() in newAction()
app/code/community/Dg/Pricerulesextended/etc/config.xml
Pricerulesextended/Observer
插入

$helper = Mage::helper(‘subscribereward’);
$promo_value = Mage::getStoreConfig(‘subscribereward/promocode/dollarvalue’);
$promo_min = Mage::getStoreConfig(‘subscribereward/promocode/minpurchase’);

$helper->addPromoCode($email, $promo_value, $promo_min);
2) 在文件中

app\code\core\Mage\Newsletter\controllers\SubscriberController.php
$this->_redirectReferer() in newAction()
app/code/community/Dg/Pricerulesextended/etc/config.xml
Pricerulesextended/Observer
更换

app\code\core\Mage\Newsletter\controllers\SubscriberController.php
$this->_redirectReferer() in newAction()
app/code/community/Dg/Pricerulesextended/etc/config.xml
Pricerulesextended/Observer

Dg_Pricerulesextended_Model_Observer

我已经按照步骤做了,但仍然无法让它工作。有人愿意透露一下吗?

Aheadworks有一个扩展名为跟进电子邮件,它正是这样做的。我为客户设置了它,当客户注册时(或许多操作),它会发送一封带有随机生成优惠券(或标准优惠券)的欢迎电子邮件


另外,你可以做的只是制作一个优惠券代码并将其添加到欢迎电子邮件模板中。只需制作一封新的事务性电子邮件,并将优惠券添加到模板中。根本不需要自定义编码。

既然这是Magento,有什么特别不起作用?发生了什么?代码根本不起作用,使用上面的代码,我可以在我的管理面板中看到设置,但没有创建规则或优惠券。嗨,这是一个很好的建议,如果我想在欢迎电子邮件模板中包含随机生成的优惠券,代码是如何运行的?同时,第一个收到折扣代码的用户将能够将“订户奖励代码”传递给其他非订户,因为我无法在Magento中定义组。。