Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Location
    Michigan
    Posts
    196
    Plugin Contributions
    0

    Default Need a custom db call when a certain product is sold.

    Hello all,

    I'm in the process of doing some research for an upcoming project. Essentially what I need to do is to make a call to a db and insert customer info when a certain product is sold. I'm just looking at some basic guidance to see where I should begin looking.

    When the customer purchases this specific product, they will be added to a special mailing list. The db only needs to know their user id and date/time of the purchase.

    Any suggestions will be appreciated.

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Need a custom db call when a certain product is sold.

    Best option is to develop a special observer class that is attached to the NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS notifier - when it gets triggered it checks the order to see if your special product was purchased and if so adds an entry to your db table.
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Jun 2006
    Location
    Michigan
    Posts
    196
    Plugin Contributions
    0

    Default Re: Need a custom db call when a certain product is sold.

    Could you possibly provide a simple example of how I would do this. I am finding the documentation a bit over my head.

 

 

Similar Threads

  1. v155 Product not showing sold out when it is--Help!
    By HeleneWallis in forum Managing Customers and Orders
    Replies: 4
    Last Post: 18 Jul 2016, 04:27 PM
  2. Stock Control count when product with attribute sold.
    By kevin_a in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 22 Mar 2013, 07:29 PM
  3. Replies: 0
    Last Post: 5 Nov 2009, 04:49 PM
  4. Show Adsense ads when product is sold out?
    By Romac35 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Oct 2009, 12:58 AM
  5. product is call when price = 0
    By JohnBoyCR in forum General Questions
    Replies: 0
    Last Post: 2 Jun 2009, 05:17 PM

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