Results 1 to 2 of 2
  1. #1
    Join Date
    May 2008
    Posts
    18
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    Jan 2004
    Posts
    58,283
    Blog Entries
    3
    Plugin Contributions
    106

    Default 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!
    Donations always welcome: www.zen-cart.com/donate

    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.

 

 

Similar Threads

  1. How come I can't modify $_POST variables in an observer
    By audleman in forum General Questions
    Replies: 6
    Last Post: 8 Apr 2008, 07:55 PM
  2. Clarification on number of parms to an observer
    By swguy in forum General Questions
    Replies: 2
    Last Post: 1 Jan 2007, 11:50 PM
  3. modifying shipping w/ observer
    By magichat in forum General Questions
    Replies: 0
    Last Post: 2 Nov 2006, 08:35 PM
  4. session objects in the observer class
    By wdrwc in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 Jul 2006, 06:48 PM
  5. session objects in the observer class
    By wdrwc in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Jul 2006, 11:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •