Thread: order id 1

Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2009
    Posts
    66
    Plugin Contributions
    0

    Default order id 1

    my actual order id is 27. after testing the shop, i need to reset the order id to 1. ho can I do that?

    do I have only to empty the table orders and run ALTER TABLE zen_orders AUTO_INCREMENT = 0 ?

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

    Default Re: order id 1

    There are many tables related to storing order data. You cannot just empty the "orders" table or else you will encounter serious errors when placing new orders.

    There are many approaches, depending on your database knowledge and skill.

    One approach could be to:
    a) delete all 27 existing orders using the "delete" button, one at a time.
    b) then reset the auto-increment to 1 on the orders table.

    Or, as many others prefer, you could use the Admin->Tools->Store Manager utility to reset the order numbering at a higher number, say 100.
    .

    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
    Jun 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: order id 1

    You says "delete all 27 existing orders using the "delete" button, one at a time and then reset the auto-increment to 1 on the orders table" but before you said that i cannot just empty only the orders table because there are many tables related to storing order data. Which are these tables? i need to delete the stored data even in these tables?
    thank you

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

    Default Re: order id 1

    If you use the "delete" button in your Zen Cart admin Orders page, the system will properly delete the records from the respective tables.
    .

    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.

  5. #5
    Join Date
    Jun 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: order id 1

    Quote Originally Posted by DrByte View Post
    If you use the "delete" button in your Zen Cart admin Orders page, the system will properly delete the records from the respective tables.
    So, i have just to delete orders by "delete" button in my Zen Cart admin Orders page, and after that I canreset the auto-increment to 1 on the orders table by alter table?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: order id 1

    Yes, I thought that's what I had said.
    .

    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.

  7. #7
    Join Date
    Jun 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: order id 1

    Quote Originally Posted by DrByte View Post
    Yes, I thought that's what I had said.
    why, when I delete orders by "delete" button in my Zen Cart admin Orders page, have I to insert a autoincrement in the admin page higher than the last order? why is me that I have to run a sql command manually in phpmyadmin to alter table with autoincrement 0?

  8. #8
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: order id 1

    Your other alternative is to delete the entire cart and re-install ... that will give you a nice clean database.
    .

    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. v151 Order email advice second order showing zero follows actual order
    By shags38 in forum General Questions
    Replies: 5
    Last Post: 15 Apr 2015, 06:54 AM
  2. Replies: 1
    Last Post: 5 Jan 2011, 07:34 PM
  3. How do I Edit Order of Order Totals in Order Confirmation Email?
    By toussi in forum Managing Customers and Orders
    Replies: 1
    Last Post: 20 Mar 2009, 08:05 AM
  4. My Order History and Order History Details - how do I get order comments in both?
    By trisha1581 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Nov 2007, 06:37 PM
  5. Orders- Update status of order, delete order or print order paperwork.
    By dandownunder in forum Managing Customers and Orders
    Replies: 6
    Last Post: 8 Aug 2006, 09:11 AM

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