【问题标题】:Send account confirmation email to specific customer group in magento向magento中的特定客户组发送帐户确认电子邮件
【发布时间】:2014-05-27 13:15:40
【问题描述】:
如何在magento中向特定客户群发送账户确认邮件

我只想向特定客户群发送确认电子邮件。请任何人都可以帮助解决这个问题....

我已经在注册或创建新帐户时使用以下链接保存了客户组:-

http://phpmagento.blogspot.in/2012/01/how-to-show-customer-group-selecter-in.html

【问题讨论】:

    标签: magento


    【解决方案1】:

    转到\app\code\core\Mage\Customer\Model\Customer.php

    替换

            <pre>
                public function isConfirmationRequired()
                    {   
                        if ($this->canSkipConfirmation()) {
                            return false;
                        }
                        if (self::$_isConfirmationRequired === null) {
                            $storeId = $this->getStoreId() ? $this->getStoreId() : null;
                            self::$_isConfirmationRequired = (bool)Mage::getStoreConfig(self::XML_PATH_IS_CONFIRM, $storeId);
    
                        }
    
                        return self::$_isConfirmationRequired;
                    }
            </pre>
    

    与:

    公共函数 isConfirmationRequired() {
    if ($this->canSkipConfirmation()) { 返回假; } if (self::$_isConfirmationRequired === null) { $storeId = $this->getStoreId() ? $this->getStoreId() : null; if($this->getGroupId() == 2) { self::$_isConfirmationRequired = (bool)Mage::getStoreConfig(self::XML_PATH_IS_CONFIRM, $storeId); } } return self::$_isConfirmationRequired; } </pre>

    其中 2 是批发组 ID。

    【讨论】:

      【解决方案2】:

      创建客户时发送帐户确认电子邮件。 创建客户帐户后将客户组添加到客户。

      因此,不可能仅向特定客户群发送确认电子邮件。

      【讨论】:

        【解决方案3】:

        我认为您必须在 magento 中进行一些自定义。

        试试

        1. 禁用所有电子邮件确认。见How To Enable/Disable Email confirmation for New Account

        2. 然后为客户保存创建一个观察者。见magento customer_save_after model / observer not called, catch customer -> edit -> save function

        3. 查看客户是否是新客户,是否在正确的组中(可能需要查看之前是否收到过确认邮件)

        4. 将发送电子邮件确认的逻辑从基础 magento 复制到您的观察者中

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2023-03-21
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-02-22
          • 2021-06-16
          相关资源
          最近更新 更多