Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2007
    Location
    Taiwan
    Posts
    241
    Plugin Contributions
    0

    Default [Done v1.3.9a] Customers Orders - Total - Sometimes Wrong

    The amounts shown in Customers Orders - Total are not always correct. For example, one of my customers is showing in the report with an order total of $580, but when I check his actual order history, he's only made one order of about $83.

    There are several incorrect entries like that.

    ZC 1.38a

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Customers Orders - Total - Sometimes Wrong

    The report is not including shipping ... is that the difference you are seeing?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Mar 2007
    Location
    Taiwan
    Posts
    241
    Plugin Contributions
    0

    Default Re: Customers Orders - Total - Sometimes Wrong

    I seem to have made a mistake...

    There were a few entries off by an insignificant amount, and maybe the shipping charge could account for that.

    But the biggest discrepancy was a customer who was showing an order history of $580, but his account showed only one order of about $80.

    When I do a search on the customer's name, I find he has created 3 accounts, and it's this total that is showing in the report.

    But this raises the question - How does the Best Customer Orders-Total report gather data? Is it on Customer's last name or full name? I use this report for creating group discounts for loyal customers.

    It would be better for me, and easier to track, if the report was based on customer number. That way I could avoid giving discounts to people who create multiple account to take advantage of my new customer discount.
    Last edited by paul3648; 7 Sep 2008 at 03:56 PM. Reason: clarification

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Customers Orders - Total - Sometimes Wrong

    The SELECT statement for that report is:
    PHP Code:
      $customers_query_raw "select c.customers_id, c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price)+sum(op.onetime_charges)  as ordersum from " TABLE_CUSTOMERS " c, " TABLE_ORDERS_PRODUCTS " op, " TABLE_ORDERS " o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC"
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Customers Orders - Total - Sometimes Wrong

    It's an old topic, but this appears to be a bug (in Zen Cart version 1.3.8a):
    $customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price)+sum(op.onetime_charges) as ordersum from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC";
    Should probably be:
    $customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price)+sum(op.onetime_charges) as ordersum from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_id order by ordersum DESC";

 

 

Similar Threads

  1. v1371 orders sometimes not showing up in admin panel
    By idtags in forum Managing Customers and Orders
    Replies: 5
    Last Post: 30 May 2012, 12:59 AM
  2. Sometimes customers allowed Free shipping (not supposed to be)
    By jpietrowiak in forum General Questions
    Replies: 6
    Last Post: 21 Mar 2011, 03:30 AM
  3. Replies: 2
    Last Post: 2 Oct 2008, 02:22 AM
  4. Customers Unable to log in (sometimes)
    By cfe in forum General Questions
    Replies: 1
    Last Post: 20 Jun 2007, 04:23 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