cancel
Showing results for 
Search instead for 
Did you mean: 

Send new order email after order successfull

SOLVED

Send new order email after order successfull

Hi Everybody

 

I want to send the new order email at the success page stage. I'm using magento 1.9 and as you know in this version has been introduced the mail queue which is run with cronjobs, so far so good, my issue is that I'm using an external system for payment and when magento gets redirected to the payment gateway it doesn't send the email to the queue because of the redirect check in the core class.

I've managed already to send the email before, but want I want to do is to add the email of new order when the transaction is successfull. Do you know how I can accomplish this task? 

I've seen a large number of solutions which unfortunately don't suite my situation, hope you can point me in the right direction so I can implement it.

 

Thanks in advance for your help.Smiley Very Happy

6 REPLIES

Re: Send new order email after order successfull

@dersuchende

 

For your requirements you can use Magento event "Place_order_after" and with this you can use your custom code for what you want.

Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html

Re: Send new order email after order successfull

Hi @theMageComp, thanks for tips, do you think I can use an observer for it? However is the order object still there (so I can use $order->sendneworderemail())?

 

Re: Send new order email after order successfull

I've managed to sort it out. @theMageComp you've given me right heads up, I should've used the observers before. The event I was needing to listen was "checkout_onepage_controller_success_action".

 

Following the instructions at:

http://letsknowit.com/send-order-data-to-other-server

 

I've found out how to properly apply it, now I'm able to listen to the specifc event then send the new order email.

 

If you have any queries let me know.

Re: Send new order email after order successfull

Okay, great Smiley Happy

Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html

Re: Send new order email after order successfull

Hi!

I have the same problem on magento 1.9.2.3. but when I fix this code I get white screen!

How to I fix it!?

regards, Goran

Re: Send new order email after order successfull

Hi goransabo, sorry for the late reply, have you enabled the php error trace in your index.php?

 

If not, add this code to your index.php and tell what you get as error

 

error_reporting(E_ALL);
ini_set('display_errors', 1);