Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,695
    Plugin Contributions
    123

    Default [Not a bug] Duplicate order ids show in admin->customers->orders

    You can see from the attached image that the same order number shows up twice for the last 2 orders.

    Name:  dup_orders.jpg
Views: 220
Size:  13.8 KB

    The debug statement on line 843 (when uncommented) displays

    I SEE C: select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, o.customers_company, o.customers_email_address, o.customers_street_address, o.delivery_company, o.delivery_name, o.delivery_street_address, o.billing_company, o.billing_name, o.billing_street_address, o.payment_module_code, o.shipping_module_code, o.ip_address from (zen_orders_status s, zen_orders o ) left join zen_orders_total ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') where (o.orders_status = s.orders_status_id and s.language_id = '1') order by o.orders_id DESC

    I believe this could be fixed by modifying admin/orders.php line 841 to add just before the order by " GROUP BY o.orders_id"
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,695
    Plugin Contributions
    123

    Default Re: Duplicate order ids show in admin->customers->orders

    ARGH! This issue was created by a database with dangling records. I thought I had cleaned out some records but hadn't.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3

    Default Re: Duplicate order ids show in admin->customers->orders

    I got the same problem after I used "TRUNCATE TABLE `orders`" on my database.

    Afterwards, I recovered these tables with "Order_..." in my database, and then it works right.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Duplicate order ids show in admin->customers->orders

    Quote Originally Posted by Eric Chen View Post
    I got the same problem after I used "TRUNCATE TABLE `orders`" on my database.
    Yup. TRUNCATE is a bad thing to do without first studying how all the 93 database tables interact with each other ;)
    .

    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.

 

 

Similar Threads

  1. v155 Customers Comments Don't Show In Admin orders.php
    By bottyz in forum Upgrading to 1.5.x
    Replies: 12
    Last Post: 8 Oct 2017, 11:09 PM
  2. Replies: 6
    Last Post: 24 Mar 2011, 04:39 PM
  3. Why do my admin customers and orders pages show no details?
    By kjreif in forum Managing Customers and Orders
    Replies: 3
    Last Post: 23 Apr 2010, 09:58 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