Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9256853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:04:13+00:00 2026-06-18T12:04:13+00:00

I’ve been looking through files and scratching my head. Where is the function to

  • 0

I’ve been looking through files and scratching my head. Where is the function to send new account creation emails? And once I find it what variable would I use to refer to a particular customer group?

EDIT 2/18
Per the suggestion below I am looking at the Customer.php file and see the following function:

 public function sendNewAccountEmail($type = 'registered', $backUrl = '', $storeId = '0')
    {
        $types = array(
            'registered'   => self::XML_PATH_REGISTER_EMAIL_TEMPLATE,  // welcome email, when confirmation is disabled
            'confirmed'    => self::XML_PATH_CONFIRMED_EMAIL_TEMPLATE, // welcome email, when confirmation is enabled
            'confirmation' => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE,   // email with confirmation link
        );
        if (!isset($types[$type])) {
            Mage::throwException(Mage::helper('customer')->__('Wrong transactional account email type'));
        }

        if (!$storeId) {
            $storeId = $this->_getWebsiteStoreId($this->getSendemailStoreId());
        }

        $this->_sendEmailTemplate($types[$type], self::XML_PATH_REGISTER_EMAIL_IDENTITY,
            array('customer' => $this, 'back_url' => $backUrl), $storeId);

        return $this;
    }

I assume I can set a different type in the $types array but how do I access the constant
const XML_PATH_REGISTER_EMAIL_IDENTITY = ‘customer/create_account/email_identity’ to set a new type condition? I haven’t yet figured out how to find xml paths.


Edit 2/21

I’ve copied the whole module file and renamed it and created it as my own module. I changed the following in the config file:

<customer_create_account_email_template_dvm translate="label" module="customer">
                    <label>New account DVM</label>
                    <file>account_new_dvm.html</file>
                    <type>html</type>
                </customer_create_account_email_template_dvm>

To add my template and also here second from bottom.

<create_account>
                <confirm>0</confirm>
                <default_group>1</default_group>
                <tax_calculation_address_type>billing</tax_calculation_address_type>
                <email_domain>example.com</email_domain>
                <email_identity>general</email_identity>
                <email_template>customer_create_account_email_template</email_template>
                <email_confirmation_template>customer_create_account_email_confirmation_template</email_confirmation_template>
                <email_register_template_dvm>customer_create_account_email_register_template_dvm</email_register_template_dvm>
                <email_confirmed_template>customer_create_account_email_confirmed_template</email_confirmed_template>
                <vat_frontend_visibility>0</vat_frontend_visibility>
            </create_account>

Then added the constant to Customer.php

const XML_PATH_CONFIRM_EMAIL_TEMPLATE_DVM       = 'customer/create_account/email_confirmation_template_dvm';

and modified function:

public function sendNewAccountEmail($type = 'registered', $backUrl = '', $storeId = '0')
    {

        Mage::getSingleton('core/session', array('name'=>'frontend')); 
        $session = Mage::getSingleton('customer/session');

        //Caitlin Havener
        //What Group do you belong to?
        if($session->isLoggedIn()) {
            $customerGroupID = $session->getCustomerGroupId();
            print("Customer Group ID is ". $customerID);
        } else {
            echo 'Not logged In';
        }

        //If you are DVM set your type
        if ($customerGroupID==5)
        {
            $type = 'dvm';
        }

        $types = array(
            'registered'   => self::XML_PATH_REGISTER_EMAIL_TEMPLATE,  // welcome email, when confirmation is disabled
            'confirmed'    => self::XML_PATH_CONFIRMED_EMAIL_TEMPLATE, // welcome email, when confirmation is enabled
            'confirmation' => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE,   // email with confirmation link
            'dvm' => self::XML_PATH_REGISTER_EMAIL_TEMPLATE_DVM,   // dvm new account email
        );
        if (!isset($types[$type])) {
            Mage::throwException(Mage::helper('customer')->__('Wrong transactional account email type'));
        }

        if (!$storeId) {
            $storeId = $this->_getWebsiteStoreId($this->getSendemailStoreId());
        }

        $this->_sendEmailTemplate($types[$type], self::XML_PATH_REGISTER_EMAIL_IDENTITY,
            array('customer' => $this, 'back_url' => $backUrl), $storeId);

        return $this;
    }

I tested it out and it does not work. As you can see I have some echos to trace, but I’m not sure how to directly debug this. I have Firebug but can’t figure out how to use it. Any suggestions would be more than greatly appreciated. Would $session->isLoggedIn() evaluate false?

UPDATE 2/27/13___________________________________________
@Meabed
I’m trying to replicate what you are doing in blog post. I made a folder called CaitlinHavener, put DVMCustomer directory in it and an etc folder within that. I have config.xml inside of it:

<template>
            <email>
                <CaitlinHavener_DVMCustomer translate="label" module="mymodule">
                    <label>DVMCustomer Template</label>
                    <file>custom/mytemplate.html</file>
                    <type>html</type>
                </CaitlinHavener_DVMCustomer>
            </email>
</template>

and inside system.xml I have:

<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <sections>
        <customer translate="label" module="mymodule">
            <groups>
                <custom_email translate="label">
                    <label>DVM Custom Template</label>
                    <frontend_type>text</frontend_type>
                    <sort_order>5</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>0</show_in_website>
                    <show_in_store>0</show_in_store>
                    <fields>
                            <exist_user_template translate="label">
                                <label>DVM Custom Template</label>
                                <frontend_type>select</frontend_type>
                                <source_model>adminhtml/system_config_source_email_template</source_model>
                                <sort_order>3</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>1</show_in_website>
                                <show_in_store>1</show_in_store>
                            </exist_user_template>
                    </fields>
                </custom_email>
            </groups>
        </customer>
    </sections>
</config>

I created a modules xml called CaitlinHavener_DVMCustomer.xml and put it in the modules folder:

<?xml version="1.0" encoding="UTF-8"?>
<config>    
    <modules>
        <CaitlinHavener_DVMCustomer>
            <active>true</active>
            <codePool>local</codePool>
        </CaitlinHavener_DVMCustomer>
    </modules>
</config>

When I go to system>config>advanced I can see that the system registers the module but when I go to system>transactional emails I do not see it there or when I create new template and select “load template”.

Do you see what I am doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:04:15+00:00Added an answer on June 18, 2026 at 12:04 pm

    You need to make another module and Extend the customer Model

    class Mage_Customer_Model_Customer extends Mage_Core_Model_Abstract
    

    the model has all the method related to send emails, so you need to check for the customer group and set the template the you want to send.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have been unable to fix a problem with Java Unicode and encoding. The
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I need a function that will clean a strings' special characters. I do NOT
I want to construct a data frame in an Rcpp function, but when I
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.