Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wanting to search for customers who purchased a product


UncleSteve

Recommended Posts

I've tried several add-ons, but not found what I'm looking for, so asking for help please?

 

I need to be able to search for customers who purchased a particular product, or search for orders that contain a particular product.

 

Can someone suggest a method or a suitable add-on to acheive the above please?

 

Thanks in advance

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

SELECT DISTINCT op.products_name, o.customers_name, o.customers_email_address
FROM orders o
LEFT JOIN orders_products op
ON o.orders_id = op.orders_id
WHERE op.products_id = x
ORDER BY op.products_name

 

Change the x to the ID of the product you are searching on. Untested.

Link to comment
Share on other sites

SELECT DISTINCT op.products_name, o.customers_name, o.customers_email_address
FROM orders o
LEFT JOIN orders_products op
ON o.orders_id = op.orders_id
WHERE op.products_id = x
ORDER BY op.products_name

 

Change the x to the ID of the product you are searching on. Untested.

 

Completely correct, but I think he'd want this wrapped in an admin page that shows up in the admin menu... I don't think this already exists, but it can be done by cloning one of the admin pages (like customers.php) and adjusting the queries and fields.

 

Link to comment
Share on other sites

  • 4 weeks later...

Hi Guy's,

 

So sorry for the late reply. I don't seem to be getting notifications.

 

Thanks for your posts, I'll go and try them out :)

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

I tried that Find Customers By Product add-on and it didn't work...

Add-Ons personally installed:

Step by Step Manual Order -- Request Reviews -- Reviews in Product Listing -- Reviews in Product Display -- Review Approval System -- Leverage Browser Cache --
Header Tag Controller -- Multilayer SEO Pop Out Menu -- Follow Us Box -- View All Products -- USPS Shipping Labels -- UPS Shipping Labels -- Monthly Sales/Tax Report --
htacess Optimisation -- Remove Unused Images -- Master Password -- Admin Change Customer Password -- Database Backup Manager -- Zero Stock Report --
Searchbox Search In Descriptions -- Easy Populate 2.76i -- Barcode Rendering -- Admin Sort By Model -- Products Purchased Report

Add-Ons personally developed:

Search for email address, etc in Orders -- Discontinue Product

Add-Ons installed by others:

View Counter -- Site Monitor -- Image Thumbnailer -- Database Optimizer -- Recaptcha -- Discount Coupons -- Add More Fields

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...