删除Magento测试订单

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了删除Magento测试订单相关的知识,希望对你有一定的参考价值。

  1. SET FOREIGN_KEY_CHECKS=0;
  2.  
  3. TRUNCATE `sales_order`;
  4. TRUNCATE `sales_order_datetime`;
  5. TRUNCATE `sales_order_decimal`;
  6. TRUNCATE `sales_order_entity`;
  7. TRUNCATE `sales_order_entity_datetime`;
  8. TRUNCATE `sales_order_entity_decimal`;
  9. TRUNCATE `sales_order_entity_int`;
  10. TRUNCATE `sales_order_entity_text`;
  11. TRUNCATE `sales_order_entity_varchar`;
  12. TRUNCATE `sales_order_int`;
  13. TRUNCATE `sales_order_text`;
  14. TRUNCATE `sales_order_varchar`;
  15. TRUNCATE `sales_flat_quote`;
  16. TRUNCATE `sales_flat_quote_address`;
  17. TRUNCATE `sales_flat_quote_address_item`;
  18. TRUNCATE `sales_flat_quote_item`;
  19. TRUNCATE `sales_flat_quote_item_option`;
  20. TRUNCATE `sales_flat_order_item`;
  21. TRUNCATE `sendfriend_log`;
  22. TRUNCATE `tag`;
  23. TRUNCATE `tag_relation`;
  24. TRUNCATE `tag_summary`;
  25. TRUNCATE `wishlist`;
  26. TRUNCATE `log_quote`;
  27. TRUNCATE `report_event`;
  28.  
  29. ALTER TABLE `sales_order` AUTO_INCREMENT=1;
  30. ALTER TABLE `sales_order_datetime` AUTO_INCREMENT=1;
  31. ALTER TABLE `sales_order_decimal` AUTO_INCREMENT=1;
  32. ALTER TABLE `sales_order_entity` AUTO_INCREMENT=1;
  33. ALTER TABLE `sales_order_entity_datetime` AUTO_INCREMENT=1;
  34. ALTER TABLE `sales_order_entity_decimal` AUTO_INCREMENT=1;
  35. ALTER TABLE `sales_order_entity_int` AUTO_INCREMENT=1;
  36. ALTER TABLE `sales_order_entity_text` AUTO_INCREMENT=1;
  37. ALTER TABLE `sales_order_entity_varchar` AUTO_INCREMENT=1;
  38. ALTER TABLE `sales_order_int` AUTO_INCREMENT=1;
  39. ALTER TABLE `sales_order_text` AUTO_INCREMENT=1;
  40. ALTER TABLE `sales_order_varchar` AUTO_INCREMENT=1;
  41. ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;
  42. ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;
  43. ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;
  44. ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;
  45. ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;
  46. ALTER TABLE `sales_flat_order_item` AUTO_INCREMENT=1;
  47. ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;
  48. ALTER TABLE `tag` AUTO_INCREMENT=1;
  49. ALTER TABLE `tag_relation` AUTO_INCREMENT=1;
  50. ALTER TABLE `tag_summary` AUTO_INCREMENT=1;
  51. ALTER TABLE `wishlist` AUTO_INCREMENT=1;
  52. ALTER TABLE `log_quote` AUTO_INCREMENT=1;
  53. ALTER TABLE `report_event` AUTO_INCREMENT=1;
  54.  
  55. -- reset customers
  56. TRUNCATE `customer_address_entity`;
  57. TRUNCATE `customer_address_entity_datetime`;
  58. TRUNCATE `customer_address_entity_decimal`;
  59. TRUNCATE `customer_address_entity_int`;
  60. TRUNCATE `customer_address_entity_text`;
  61. TRUNCATE `customer_address_entity_varchar`;
  62. TRUNCATE `customer_entity`;
  63. TRUNCATE `customer_entity_datetime`;
  64. TRUNCATE `customer_entity_decimal`;
  65. TRUNCATE `customer_entity_int`;
  66. TRUNCATE `customer_entity_text`;
  67. TRUNCATE `customer_entity_varchar`;
  68. TRUNCATE `log_customer`;
  69. TRUNCATE `log_visitor`;
  70. TRUNCATE `log_visitor_info`;
  71.  
  72. ALTER TABLE `customer_address_entity` AUTO_INCREMENT=1;
  73. ALTER TABLE `customer_address_entity_datetime` AUTO_INCREMENT=1;
  74. ALTER TABLE `customer_address_entity_decimal` AUTO_INCREMENT=1;
  75. ALTER TABLE `customer_address_entity_int` AUTO_INCREMENT=1;
  76. ALTER TABLE `customer_address_entity_text` AUTO_INCREMENT=1;
  77. ALTER TABLE `customer_address_entity_varchar` AUTO_INCREMENT=1;
  78. ALTER TABLE `customer_entity` AUTO_INCREMENT=1;
  79. ALTER TABLE `customer_entity_datetime` AUTO_INCREMENT=1;
  80. ALTER TABLE `customer_entity_decimal` AUTO_INCREMENT=1;
  81. ALTER TABLE `customer_entity_int` AUTO_INCREMENT=1;
  82. ALTER TABLE `customer_entity_text` AUTO_INCREMENT=1;
  83. ALTER TABLE `customer_entity_varchar` AUTO_INCREMENT=1;
  84. ALTER TABLE `log_customer` AUTO_INCREMENT=1;
  85. ALTER TABLE `log_visitor` AUTO_INCREMENT=1;
  86. ALTER TABLE `log_visitor_info` AUTO_INCREMENT=1;
  87.  
  88. -- Reset all ID counters
  89. TRUNCATE `eav_entity_store`;
  90. ALTER TABLE `eav_entity_store` AUTO_INCREMENT=1;
  91.  
  92. SET FOREIGN_KEY_CHECKS=1;

以上是关于删除Magento测试订单的主要内容,如果未能解决你的问题,请参考以下文章

删除Magento测试订单

sql M1:删除magento的所有订单。

sql Magento - 删除订单

删除已取消的magento订单cron

sql Magento-1.7.2:删除所有订单和dashboard.sql

Magento + Paypal - 订单状态停留在“付款审查”