Forums / Contribution-Writing Guidelines / Is this possible? Zen Cart observer + MySql?

Is this possible? Zen Cart observer + MySql?

Locked

Started by visua on 20 Mar 2009, 3:53 AM · Views: 2,226

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
20 Mar 2009, 3:53 AM
#1
visua avatar

visua

New Zenner

Join Date:
May 2008
Posts:
18
Plugin Contributions:
0

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.

20 Mar 2009, 5:17 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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']

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.