1

I have tried the other answers but have been unsuccessful. I am fairly new to PHP, XML, OOP, and Magento, sorry about that...

I would like to disable the "Welcome new customer email" that is sent when a new client has created a new account, that is the only scenario I wish to disable.

can you please tell me:

  • The name and address of the file or files.
  • Location of the snippet or snippets to change in the file (line number or surrounding code)
  • What is happening when I change it.
  • What is it I am changing ( function , property , object, ...)
  • One great Magento newbi help tip. ;-)

Is the sendNewAccountEmail() being triggered from both a Global and Local variable? almost like a fail safe?

Thank you so much for your time, professional help and advice. dond223

1 Answer 1

0
  1. The base file is in : app/code/core/Mage/Customer/Model/Customer.php.

  2. The function is : sendNewAccountEmail();

  3. If you want to update this function, you have to rewrite this model : app/code/core/Mage/Customer/Model/Customer.phpin local codepool app/code/local, you can find many tutorial to how to rewrite Magento Model.

    Maybe you ask yourself the question, why we rewrite the model instead to update it directly in the original folder ? So because it's forbidden to update the native Magento files app/code/core/... and this for many reasons, I can give you one reason quickly : If you update directly the native file, and one day if you install a patch of upgrade the Magento version or some magento updates, if that file is updated, you'll lose your updates+ errors.

  4. The template of welcome customer email is in: app/locale/languagecode_ISO/template/email/account_new.html

  5. If you want to disable sending Emails : comment these two lines in that function sendNewAccountEmail() :

    //$this->_sendEmailTemplate($types[$type], self::XML_PATH_REGISTER_EMAIL_IDENTITY,
            //array('customer' => $this, 'back_url' => $backUrl), $storeId);
    
2
  • 1
    Thank you so much for your answer Prince. Upon reading your "forbidden" warning I chose to accept that I should just let the email annoyance be. I also really appreciate your professional help and easy to understand explanations. You ROCK! Thank you again !!! Commented Oct 17, 2018 at 14:03
  • You're welcome ;) If the answer helped you, you can accept it.
    – PЯINCƎ
    Commented Oct 17, 2018 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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