Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Posts
    15
    Plugin Contributions
    0

    Default Check to see if current customer purchased specific product.

    Hello.. hopefully someone can help me.. I'm trying to write a code where it's like

    if $_SESSION['customer_id'] purchased product ='123' echo 'HTML'

    basically I want to display a specific message to customers who have purchase specific products on who they should contact/what they should do next. Thanks in advance!

  2. #2
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Check to see if current customer purchased specific product.

    Quote Originally Posted by camerondied View Post
    Hello.. hopefully someone can help me.. I'm trying to write a code where it's like

    if $_SESSION['customer_id'] purchased product ='123' echo 'HTML'

    basically I want to display a specific message to customers who have purchase specific products on who they should contact/what they should do next. Thanks in advance!
    Tables orders and orders_products are tables you want to reference/use. Orders has the customers_id and an orders_id in it, while orders_products has the matching orders_id and then the products_id(s) associated with the order. So thinking you would want to do a sql query on the set of tables and depending on how many such searches you want to do you could either focus the query or leave it open. Focussed would be to ask the sql server to look for the customer to have purchased the specific product id, a little left open would be to obtain a list of all products_ids that the customer has purchased... Wide open would be to just pull all order history. :)

    if you do a specific search, then if there is a response (RecordCount() > 0), and/or not at the End Of File (EOF) then the product was previously purchased and to take an action...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    May 2006
    Posts
    15
    Plugin Contributions
    0

    Default Re: Check to see if current customer purchased specific product.

    I just work with CSS.. i'm not a very good programmer.. can you or someone help me writing this code.. I can pay money for your time. Thanks :)

 

 

Similar Threads

  1. Replies: 0
    Last Post: 12 Jul 2012, 01:47 AM
  2. Replies: 1
    Last Post: 3 Dec 2009, 10:21 PM
  3. Replies: 2
    Last Post: 24 Apr 2008, 10:29 PM
  4. Customer can not see check out in Step 3
    By windwoman in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 Apr 2008, 02:24 PM
  5. Replies: 3
    Last Post: 18 Aug 2006, 09:40 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