Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2011
    Posts
    32
    Plugin Contributions
    0

    Default Run custom script only after successful checkout

    Is it possible to run a php script upon successful checkout, after the customer has paid for an order, on zen-cart? Thanks.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Run script only after successful checkout

    'Most anything is possible ... What are you trying to do specifically?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jun 2011
    Posts
    32
    Plugin Contributions
    0

    Default Re: Run script only after successful checkout

    I am looking to add a row in table in the same mysql database with the product quantity for a different php script.

  4. #4
    Join Date
    Jun 2011
    Posts
    32
    Plugin Contributions
    0

    Default Re: Run script only after successful checkout

    I think I can get it done by adding it to the payment module under includes/modules/payment. Is there a way to do this so I can update my table with all payment modules?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Run script only after successful checkout

    Quote Originally Posted by urgentprog View Post
    I am looking to add a row in table in the same mysql database with the product quantity for a different php script.
    Write your own custom observer class to hook the NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS notifier point and do your custom database code insertion from that observer class.
    There are many addons in the Addons section which use notifier/observer classes, and the concepts are outlined in the wiki.
    .

    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 2011
    Posts
    32
    Plugin Contributions
    0

    Default Re: Run script only after successful checkout

    Great! Thank you.

    I got it coded but when I try testing with authorize.net sim I get

    There has been an error processing your credit card. Please try again.

    The debug email I get though says Response Text: (TESTMODE) This transaction has been approved.

  7. #7
    Join Date
    Jun 2011
    Posts
    32
    Plugin Contributions
    0

    Default Re: Run custom script only after successful checkout

    nm. The issue with sim was the md5 hash not matching

    https://www.zen-cart.com/tutorials/i...hp?article=403

 

 

Similar Threads

  1. Replies: 5
    Last Post: 22 Nov 2014, 04:26 AM
  2. How to run a script upon purchase?
    By djex in forum General Questions
    Replies: 2
    Last Post: 6 Feb 2009, 05:26 PM
  3. Replies: 10
    Last Post: 10 Jan 2008, 09:21 AM
  4. custom image popup script only work for main image, not for additional images
    By gems14k in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 4 Oct 2006, 05: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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR