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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

8 REPLIES 8

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.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

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

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

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);

 

Re: Send new order email after order successfull

We are using payu plugin in magento 2.3.3 the movement the it goes to the payment gateway page the order confirmation mail is sent out

We need to know how we can get this working to send mail only after payment confirmation

I se that the above solution working for lower version but not for 2.3.3 do you have any support on this ? http://www.tecsilk.com

Re: Send new order email after order successfull

Hello
For Magento 2, you can use this free extension for it.
Follow user guide.
https://magecomp.com/magento-2-order-confirmation-email.html
Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now