Tahseen Khan
Tahseen Khan

Reputation: 19

Can Magento send email to admin, when user place order ?

Can Magento send email to admin, when user place order ?

It is necessary to send information about placed order to admin’s email admin notification should have another template

Upvotes: 0

Views: 9180

Answers (3)

Ben Collver
Ben Collver

Reputation: 1

The crm4ecommerce extension is encrypted, and cannot be audited for security.

Another free option is Inchoo Admin Order Notifier.

"Magento extension that enables email notifications towards various emails when customer places the order. Useful when you want your personell notified that some customer just placed the order. Supports transactional email."

From: https://github.com/ajzele/Inchoo_AdminOrderNotifier

Upvotes: 0

Krista K
Krista K

Reputation: 21851

I hacked core code to do this on my Magento install. The 1st level of properly editing core files is to override them in app/code/local somewhere...

Make your admin_order_notify_email template, save it, and note its ID. Mine was 8. Oh, and to get access to the customer's email address, use this code in the template: {{var order.getCustomerEmail()}}. This vexed me for months. :P My next trick will be to barcode the order number in the admin order notification email.

Now, open the file app/code/core/Mage/Sales/Model/Order.php

<?
    $mailTemplate = Mage::getModel('core/email_template');
    /* @var $mailTemplate Mage_Core_Model_Email_Template */
//chris  near line 854:      $copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);
    $copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD, $this->getStoreId());
    if ($copyTo && $copyMethod == 'bcc') {
        foreach ($copyTo as $email) {
//chris                $mailTemplate->addBcc($email);
        }
    }

//chris near line 900: added this to use admin email template for new orders. Note it is hard coded to template 8, which I added
        $mailTemplate->setDesignConfig(array('area'=>'frontend', 'store'=>$this->getStoreId()))
            ->sendTransactional(
                8,
                Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY, $this->getStoreId()),
                $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO),
                "MyBusinessName Orders",
                array(
                    'order'         => $this,
                    'billing'       => $this->getBillingAddress(),
                    'payment_html'  => $paymentBlock->toHtml(),
                )
            );        
?>

Upvotes: 0

Anton S
Anton S

Reputation: 12750

Yes it can you can set all orders to be bcc -d from

system > configuration > sales > sales emails

Upvotes: 1

Related Questions