Re: Question about checkout_process.php and $_SESSION['order_number_created']
An order can be created without going through the checkout_process module - this can happen in some circumstances such as delayed response from Paypal IPN, when the cart will create the order as a result of the IPN data post. However, the notifier NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS is still issued, directly by the function create_add_products in the orders.php class file.
Although not generally used at the moment, the notify function does have the capability to include a parameter array in the notification.
You could modify the notify event in the function create_add_products to include the order number as a parameter, and use that in your observer function. To do that , change this line in includes/classes/order.php:
PHP Code:
$zco_notifier->notify('NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS');
to this:
PHP Code:
$zco_notifier->notify('NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS', $zf_insert_id);
Neville
An assumption is what you arrive at when you get tired of thinking...