Thread: Orders report

Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2011
    Posts
    8
    Plugin Contributions
    0

    Default Orders report

    Hi;

    Im trying to do a products have been sold report from a store using a query from Data Base, I need select just products that have been sold successfully, I don't know if I could use orders_status field, but this query shows all records with status 1 that means pending status, query is:

    SELECT o.customers_id, op.orders_id, op.products_id, op.products_quantity, op.products_name, op.products_price,
    op.products_model, o.customers_name, o.customers_company, o.customers_email_address, o.date_purchased,
    o.orders_status
    FROM orders o, orders_products op
    WHERE op.orders_id = o.orders_id and date_purchased between '2010-05-01 00:00:00' AND '2010-05-31 23:59:00'
    ORDER by o.date_purchased

    Is this query ok for report that I need?

    Best regards
    Cheers

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Orders report

    Why not use the Sales Report addon which takes care of all that for you?
    .

    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.

  3. #3
    Join Date
    Apr 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: Orders report

    But it doesn't includes orders status and total products values

 

 

Similar Threads

  1. v139h How to generate a report of orders/day ?
    By Akasashasha in forum General Questions
    Replies: 1
    Last Post: 13 Jan 2014, 02:59 PM
  2. Need to Create a Report - Based on Orders
    By tirjasdyn in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 18 Jan 2009, 03:25 AM
  3. SQL For Orders info report
    By Tapper in forum General Questions
    Replies: 1
    Last Post: 16 Jan 2009, 05:56 AM
  4. Sales Report Showing no orders?
    By Sam_uk in forum Managing Customers and Orders
    Replies: 0
    Last Post: 21 Jul 2007, 01:12 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