New User Registration, New Order generation, while sending emails to the customer, also send emails to the Administrator

Source: Internet
Author: User

1

New Order,

This is easy to say, and it is set in the background.

System-> system-> sale emails-> order-> send order email copy

Write down the email address you sent!

2

New User

This magento is not set in the background. You need to modify the system file.

In the file:

/APP/code/CORE/MAGE/customer/model/customer. php

Add a method

'-> Addbcc ('your @ email. adrr ')'

Search

Sendnewaccountemail Function

Add a method addbcc () as shown below, which contains your email address:
Mage: GetModel ('Core/email_template ')
-> Setdesignconfig (Array ('area '=> 'frontend', 'store' => $ storeid ))
-> Addbcc ('your @ email. ADDR ')
-> Sendtransactional (....

Refresh the cache and test it!

Follow-up:

If you want to send an email when the order is generated, you can add it in the following way to view others'Article, Not very good, and did not find a good method, temporarily write down the record:

/APP/code/CORE/MAGE/Checkout/model/type/onepage. php]

If (! $ Redirecturl ){
Try {
$ Order-> sendneworderemail ();
} Catch (exception $ e ){
Mage: logexception ($ E );
}

Change

// If (! $ Redirecturl ){
Try {
$ Order-> sendneworderemail ();
} Catch (exception $ e ){
Mage: logexception ($ E );
//}

The consequence is that two emails are sent for one order, because one email is sent after the payment is successful,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.