Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2006
    Posts
    24
    Plugin Contributions
    0

    Default custom script/function to commit order details to database?

    [MODS] if this is in the wrong forum sorry, please move if needed.


    I'm creating an inhouse epos system for our shop, we currently use zencart for our online shop and I wanted to commit orders from the epos system to the database as orders, I don't want to just update the stock levels, if it goes in as an order from a customer then it is easier for me to audit it later.

    What I need to know is either, is there a single sc ript used to commit orders to the database and if so where? or what fields in which tables need to be updated in order to create a new order.

    A single sql command would be great!

    many thanks in advance.

  2. #2
    Join Date
    Feb 2006
    Posts
    24
    Plugin Contributions
    0

    Default Re: custom script/function to commit order details to database?

    I've managed to sort it.

    I created a test site on my local server, created a customer then made a dump of the DB, I then made a purchase as the new user and once completed I dumped the DB again and ran a diff between the two files and found there are 3 insert into commands that changed, I poped them into my script and it all works nicely.

  3. #3
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

    Default Re: custom script/function to commit order details to database?

    Thx for sharing !

  4. #4
    Join Date
    Dec 2008
    Location
    Rimini, Italy, Italy
    Posts
    67
    Plugin Contributions
    0

    Default Re: custom script/function to commit order details to database?

    Could you please tell us the 3 insert lines?
    Thanks

  5. #5
    Join Date
    Jan 2004
    Posts
    66,391
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: custom script/function to commit order details to database?

    Quote Originally Posted by moosesoom View Post
    Could you please tell us the 3 insert lines?
    Thanks
    You'll find them in the orders.php class file.

    But if you're going to add your own, you should use the notifier hooks in that file to intercept the inserts and use the same data to do your own additional inserts. That way you won't have to redo the custom code when an update is issued.
    .

    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.

 

 

Similar Threads

  1. Custom script in order process
    By philip937 in forum General Questions
    Replies: 0
    Last Post: 24 Jan 2011, 11:24 PM
  2. Script to Disable Right Click Save As Function on Images
    By bsteinagel in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Feb 2009, 11:04 PM
  3. Custom function upon successful order placement
    By Gwixel in forum General Questions
    Replies: 8
    Last Post: 17 May 2008, 06:37 AM
  4. Adding custom function, calling custom code from pages.
    By madteckhead in forum General Questions
    Replies: 6
    Last Post: 14 Jun 2007, 08:24 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR