0

The order confirmation email doesn't work. All other e-mails are sent. The cronjob is working properly, I checked in my database.

Screenshot:

screenshot

Magento version 1.9.2.0

1

your order model seems to miss a method: https://github.com/bragento/magento-core/blob/1.9.2.0/app/code/core/Mage/Sales/Model/Order.php#L1276

can you check the file app/code/core/Mage/Sales/Model/Order.php in your installation for the queueNewOrderEmail method?

It's also possible, if you are using the compiler, that an old Version of the Class is compiled. So, if you have activated the compiler, you could try to recompile under System -> Tools -> compiler or deactivating the compiler.

The class that would be loaded by the compiler can be found here:

include/src/Mage_Sales_Model_Order.php

Another reason could be an opcode cache. To renew it the easiest way would be to restart the webserver

The File could also have been overloaded in one of these Locations:

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

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

lib/Mage/Sales/Model/Order.php
  • Hi David, We got ahead. The problem is that the Controller cannot see (use) the queueNewOrderEmail class. It is particularly strange because it can see (use) the sendNewOrderEmail next to the previous and both are public. – Zsolt Mészáros Mar 9 '16 at 20:01
  • then it's even more likely that an old version of the class is loaded (due to the compiler or an opcode cache) since the method queueNewOrderEmail was added in the 1.9 version and the sendNewOrderEmail already existed before: github.com/bragento/magento-core/blob/1.8.1.0/app/code/core/… – David Verholen Mar 9 '16 at 20:05
  • Is there sendNewOE in the 1.9.+ versions? Or is it unnecessary there? – Zsolt Mészáros Mar 9 '16 at 20:28
  • I'm not 100% sure but I it may be still beeing used when actually sending the mail. the change in 1.9 was that the mails get queued and then afterwards sended asynchronously by a cronjob – David Verholen Mar 9 '16 at 20:41
  • actually, it's only a fallback and calls the queueNewOrderEmail Method: github.com/bragento/magento-core/blob/1.9.2.0/app/code/core/… still I'm thinking you should figure out why an old version of the class seems to be loaded – David Verholen Mar 9 '16 at 20:45
0

2 WAY to send mails from our magento store.

        Using cron AND  Avoid cron

if you DON'T WANT TO USE cron, follow this way:

GO your ->  order.php file At app/code/core/Mage/Sales/Model/Order.php

   FIND Line No: 1356,and 1450 (Change Code Both Line)

change  Code or Comment

FIND CODE ->  //$mailer->setQueue($emailQueue)->send(); 

to:

 Change:- $mailer-> send();


In app/design/frontend/base/default/template/checkout/success.phtml

then add following line Top of success page for sending mail direct every Order:
####################Top of success.PHTML
$order = Mage::getModel('sales/order');
$incrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId(); 
$order->loadByIncrementId($incrementId);

try{ $order->sendNewOrderEmail();} 
catch (Exception $ex) { echo "Email Not Sent..."; }
$customer = Mage::getSingleton('customer/session')->getCustomer();
$email = $customer->getEmail();//End Email Sending
#######################Top of

success.PHTML###############################

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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