Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1
    Join Date
    Jun 2009
    Posts
    86
    Plugin Contributions
    0

    Default Writing extra order info to the db

    I am making a custom change to the order confirmation page, and I need to modify the sql that writes the order to the database, I assume it comes after the order confirmation page, but i cant find the actual SQL.
    Thanks in advance
    Jeff

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,892
    Plugin Contributions
    96

    Default Re: Writing the order to the db

    That task occurs during the checkout_process page's processing ...

  3. #3
    Join Date
    Jun 2009
    Posts
    86
    Plugin Contributions
    0

    Default Re: Writing the order to the db

    I need to know specifically where i can find the sql statement.
    Thanks.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,892
    Plugin Contributions
    96

    Default Re: Writing the order to the db

    Look at /includes/classes/order.php; one of its member functions performs the database update.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Writing the order to the db

    NOTE: You should be using notifier+observer calls to do additional database queries, instead of changing core code.
    .

    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.

  6. #6
    Join Date
    Jun 2009
    Posts
    86
    Plugin Contributions
    0

    Default Re: Writing the order to the db

    Thanks doc, im looking onto that now
    I've made some changes to payment confirmation page, i want to append some stuff into the comments section of the order.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Writing the order to the db

    If you wanted to add another comment record, you could do that using the NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_COMMENT notifier hook.

    Or if you absolutely need to inject custom stuff into the first comment (the only customer's comment line), then you could hook NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_HEADER and append your special extra text onto the $class->info['comments'] variable, which corresponds with the order class's $this->info['comments']
    .

    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.

  8. #8
    Join Date
    Jun 2009
    Posts
    86
    Plugin Contributions
    0

    Default Re: Writing the order to the db

    Good god thank you! I was headed in the wrong direction lol

  9. #9
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Writing the order to the db

    See this recent blog post I made on building an observer class to respond to various notifier hooks: http://www.zen-cart.com/entry.php?4-...Create-Account
    .

    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.

  10. #10
    Join Date
    Jun 2009
    Posts
    86
    Plugin Contributions
    0

    Default Re: Writing the order to the db

    Quote Originally Posted by DrByte View Post
    Or if you absolutely need to inject custom stuff into the first comment (the only customer's comment line), then you could hook NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_HEADER and append your special extra text onto the $class->info['comments'] variable, which corresponds with the order class's $this->info['comments']
    This will fire when the confirm order button is press?
    As I said, I modified the confirm order (step 3 in the checkout process), I have a small javascript so they can select option of options lol.
    The confirm order button will be disabled until they select them. Since it is just a bunch of text boxes, I want to put them in an array, save them to the comments, and send them with the email.
    Easy nough, eh. lol
    Thanks again for your guidance.
    Jeff

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Formatting in [EXTRA CC ORDER info] Order Email
    By dealbyethan.com in forum Managing Customers and Orders
    Replies: 2
    Last Post: 4 Apr 2008, 03:09 PM
  2. Extra CC order info
    By antman in forum Managing Customers and Orders
    Replies: 4
    Last Post: 28 Nov 2007, 01:55 AM
  3. extra credit card info not writing to database
    By Minnie Mouse in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 19 Apr 2007, 09:16 PM

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