1

I am looking to have different Transaction Emails per Store View (or even just per website). In particular, I would like to have different Newsletter Subscription Success emails.

I have created a new Transaction Email Template, then I went to Configuration, and selected the Website / Site View in Current Configuration Scope. Then I went to Customers -> Newsletter -> Subscription Options -> Success Email Template, deselected "Use Default" and selected the new Template, and saved the config.

But despite doing all the above, the "Global" / Default Success Email Template is still being sent out for customers linked to that Site View.

What am I doing wrong?

3

It should work as you described besides after all that you did you should flush the cache and then it should be fine.

I´ve just tested it on my staging environment and it worked fine as per follows:

System-->Transactional Emails-->Add New Template

Then choose to load the default Template Newsletter Subscription Success After that you can do your adjustments and then go to

System-->Configuration

Then select your storeview and when you have done this please go to

Customers -> Newsletter -> Subscription Options -> Success Email Template

Then there you select your template you just created and that should work fine then.

3

The success email template is send by sendConfirmationSuccessEmail method in Mage_Newsletter_Model_Subscriber class:

// A lot code ...   
const XML_PATH_SUCCESS_EMAIL_TEMPLATE       = 'newsletter/subscription/success_email_template';
const XML_PATH_SUCCESS_EMAIL_IDENTITY       = 'newsletter/subscription/success_email_identity';

// A lot code ...   

/**
 * Sends out confirmation success email
 *
 * @return Mage_Newsletter_Model_Subscriber
 */
public function sendConfirmationSuccessEmail()
{
    if ($this->getImportMode()) {
        return $this;
    }

    if(!Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_TEMPLATE)
       || !Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY)
    ) {
        return $this;
    }

    $translate = Mage::getSingleton('core/translate');
    /* @var $translate Mage_Core_Model_Translate */
    $translate->setTranslateInline(false);

    $email = Mage::getModel('core/email_template');

    $email->sendTransactional(
        Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_TEMPLATE),
        Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY),
        $this->getEmail(),
        $this->getName(),
        array('subscriber'=>$this)
    );

    $translate->setTranslateInline(true);

    return $this;
}

As you can see is a system configuration used to define the template that will be used. You can set the template for each store using the store in scope System -> Configuration -> Customer -> Newsletter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.