문제

After upgrading my site from 1.4 to 1.8 I am unable to send order email from the admin panel.

When a new order is placed the customer receives the order email, but when I try to re-send the order email from the admin panel The order email has been sent message displays but neither the customer nor the admin gets the email.

I switched on logging and tried sending the order email, but nothing logs. Has anyone experienced this issue or found any solutions?

도움이 되었습니까?

해결책

Just been looking into this myself. I've followed the code and functions back to this function "public function sendNewOrderEmail()" in:

app/code/core/Mage/Sales/Model/Order.php

starting at line 1270 is the following code:

$emailSentAttributeValue = $this->load($this->getId())->getData('email_sent');
    $this->setEmailSent((bool)$emailSentAttributeValue);
    if ($this->getEmailSent()) {
        return $this;
    }

This is checking the sales_flat_order db table to see if the email has already been sent to the customer and if so just to return, but this does not send the email and should throw an error. So I would say it is a bug somewhere. To fix it so you can resend order/invoice emails etc..

Copy

app/code/core/Mage/Sales/Model/Order.php

to

app/code/local/Mage/Sales/Model/Order.php

and comment out line 1273

if ($this->getEmailSent()) {
            //return $this;
        }

Works a charm for me. But literally only this second tested it.

Tested using ver. 1.8.1

다른 팁

I also struggled with the problem of order e-mails not being sent in CE 1.9.1 but found the problem after a while:

As of Magento CE 1.9.1 Magento doesn't send order emails directly during the order process. Instead the mails are queued and are sent by the cron. So make sure to configure the Magento cronjob properly.

Also refer to:

http://www.magentocommerce.com/knowledge-base/entry/ee1141-ce191-responsive-email#cron http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-installing#install-cron

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top