Is this possible? Zen Cart observer + MySql?
Hey guys,
I've recently started learning about ZenCart observers. I am trying to build a dashboard for my mobile phone so I can manage my company using pure data and business logic.
I've set up a database to query results from my app. So I would like to somehow do inserts from within zencart events.
I think my 'structure' or method of doing this is wrong, but I can't think of another way to do it.
Say when an order is completed, I would like to send information about Inventory, and the Order just placed to the MySQL database on my server.
Any help, insight, or ideas on how to transfer this data to a new source would be great! thanks.
Re: Is this possible? Zen Cart observer + MySql?
In v1.3.8 you could hook something at the NOTIFY_HEADER_END_CHECKOUT_PROCESS point, which happens after all the order details have been stored and the customer's email has been sent.
or you could hook the NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS point which is triggered just after the product details have been stored to the current order.
or the NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE_ADD_PRODUCTS point which is triggered a moment later after setting the current order ID into a session variable which can be accessed via $_SESSION['order_number_created']