I’m trying to get the order number after an order is placed in my shop to send that to a different place the problem is I can’t find the correct event to get this. I’ve been trying with ‘Enlight_Controller_Action_Frontend_Checkout_Finish’ and ‘Shopware_Modules_Order_SaveOrder_ProcessDetails’ but sOrderNumber doesn’t seem to be defined at that point. Is there any other event to which I can subscribe to?
Yes I’m using something like this (and after your comment tried exactly that) but still not getting the order number, it’s not defined in sOrderVariables but if I refresh the page and resend the information the order number is there, so I think it’s because I’m using Enlight_Controller_Action_Frontend_Checkout_Finish and the order number is not saved yet?
You can try get the order number with Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout_Finish, or maybe you can look working with the session:
Still getting same information but no the order number. I’m using cash on delivery as payment method, don’t know if this has anything to do with my problem
Shopware_Modules_Order_SendMail_FilterVariables worked for me. With this event you do not need to access the session, because it is directly in the filtered variable. I can check the other cases tomorrow.
No, the payment it is not an issue if it is cash or something else.
As Moritz Naczenski says, also on mine side it is working properly, but the question it is after you click on submit order button and you go to the backend you can find the order there or just you’ve got an error before order confirmation ?..