magento 刪除訂單

來源:互聯網
上載者:User

magento刪除訂單,本身沒有這個功能,好像涉及到法律的問題,所以magento,沒有這個功能,但是我們測試的訂單,刪除也費盡,

有一個外掛程式,

http://www.magentocommerce.com/magento-connect/EMThemes.com/extension/4562/em_deleteorder/reviews,key:magento-community/EM_DeleteOrder,1.4.2不好用,看評論,1,4,1和1,。5沒有問題!!但是我的版本是1.4.2,安裝了不好用,不知道啥子原因!

另外一個外掛程式安裝了,可以刪除,但是郵件收不到,

下面的是一個收費的訂單外掛程式:

http://www.magentocommerce.com/magento-connect/Modulesoft+Solutions/extension/4047/mspl_orderbook

不知道咋樣,最後,還是用sql刪除吧!!

通過下面的sql語句進行刪除,刪除前先備份:

1.4版本:

SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `catalogsearch_query`;
ALTER TABLE `catalogsearch_query` AUTO_INCREMENT=1;
TRUNCATE `sales_flat_creditmemo`;
TRUNCATE `sales_flat_creditmemo_comment`;
TRUNCATE `sales_flat_creditmemo_grid`;
TRUNCATE `sales_flat_creditmemo_item`;
TRUNCATE `sales_flat_invoice`;
TRUNCATE `sales_flat_invoice_comment`;
TRUNCATE `sales_flat_invoice_grid`;
TRUNCATE `sales_flat_invoice_item`;
TRUNCATE `sales_flat_order`;
TRUNCATE `sales_flat_order_address`;
TRUNCATE `sales_flat_order_grid`;
TRUNCATE `sales_flat_order_item`;
TRUNCATE `sales_flat_order_payment`;
TRUNCATE `sales_flat_order_status_history`;
TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_quote_payment`;
TRUNCATE `sales_flat_quote_shipping_rate`;
TRUNCATE `sales_flat_shipment`;
TRUNCATE `sales_flat_shipment_comment`;
TRUNCATE `sales_flat_shipment_grid`;
TRUNCATE `sales_flat_shipment_item`;
TRUNCATE `sales_flat_shipment_track`;
TRUNCATE `sales_invoiced_aggregated`;
TRUNCATE `sales_invoiced_aggregated_order`;
TRUNCATE `sales_order_aggregated_created`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `log_quote`;
TRUNCATE `report_event`;
ALTER TABLE `sales_flat_creditmemo` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_payment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_status_history` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_payment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_shipping_rate` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_track` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoiced_aggregated` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoiced_aggregated_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_aggregated_created` AUTO_INCREMENT=1;
ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;
ALTER TABLE `tag` AUTO_INCREMENT=1;
ALTER TABLE `tag_relation` AUTO_INCREMENT=1;
ALTER TABLE `tag_summary` AUTO_INCREMENT=1;
ALTER TABLE `wishlist` AUTO_INCREMENT=1;
ALTER TABLE `log_quote` AUTO_INCREMENT=1;
ALTER TABLE `report_event` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;

老版本,大致,1,3!!

Delete test orders in Magento
SET
FOREIGN_KEY_CHECKS=0;
 TRUNCATE
`sales_order`;
TRUNCATE
`sales_order_datetime`;
TRUNCATE
`sales_order_decimal`;
TRUNCATE
`sales_order_entity`;
TRUNCATE
`sales_order_entity_datetime`;
TRUNCATE
`sales_order_entity_decimal`;
TRUNCATE
`sales_order_entity_int`;
TRUNCATE
`sales_order_entity_text`;
TRUNCATE`sales_order_entity_varchar`;TRUNCATE`sales_order_int`;TRUNCATE`sales_order_text`;TRUNCATE`sales_order_varchar`;TRUNCATE`sales_flat_quote`;TRUNCATE`sales_flat_quote_address`;TRUNCATE`sales_flat_quote_address_item`;TRUNCATE`sales_flat_quote_item`;TRUNCATE`sales_flat_quote_item_option`;TRUNCATE`sales_flat_order_item`;TRUNCATE`sendfriend_log`;TRUNCATE`tag`;TRUNCATE`tag_relation`;TRUNCATE`tag_summary`;TRUNCATE`wishlist`;TRUNCATE`log_quote`;TRUNCATE`report_event`; ALTER
TABLE
`sales_order` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_datetime` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_decimal` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_entity` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_entity_datetime` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_entity_decimal` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_entity_int` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_entity_text` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_entity_varchar` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_int` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_text` AUTO_INCREMENT=1;ALTER
TABLE
`sales_order_varchar` AUTO_INCREMENT=1;ALTER
TABLE
`sales_flat_quote` AUTO_INCREMENT=1;ALTER
TABLE
`sales_flat_quote_address` AUTO_INCREMENT=1;ALTER
TABLE
`sales_flat_quote_address_item` AUTO_INCREMENT=1;ALTER
TABLE
`sales_flat_quote_item` AUTO_INCREMENT=1;ALTER
TABLE
`sales_flat_quote_item_option` AUTO_INCREMENT=1;ALTER
TABLE
`sales_flat_order_item` AUTO_INCREMENT=1;ALTER
TABLE
`sendfriend_log` AUTO_INCREMENT=1;ALTER
TABLE
`tag` AUTO_INCREMENT=1;ALTER
TABLE
`tag_relation` AUTO_INCREMENT=1;ALTER
TABLE
`tag_summary` AUTO_INCREMENT=1;ALTER
TABLE
`wishlist` AUTO_INCREMENT=1;ALTER
TABLE
`log_quote` AUTO_INCREMENT=1;ALTER
TABLE
`report_event` AUTO_INCREMENT=1; -- reset customersTRUNCATE`customer_address_entity`;TRUNCATE`customer_address_entity_datetime`;TRUNCATE`customer_address_entity_decimal`;TRUNCATE`customer_address_entity_int`;TRUNCATE`customer_address_entity_text`;TRUNCATE`customer_address_entity_varchar`;TRUNCATE`customer_entity`;TRUNCATE`customer_entity_datetime`;TRUNCATE`customer_entity_decimal`;TRUNCATE`customer_entity_int`;TRUNCATE`customer_entity_text`;TRUNCATE`customer_entity_varchar`;TRUNCATE`log_customer`;TRUNCATE`log_visitor`;TRUNCATE`log_visitor_info`; ALTER
TABLE
`customer_address_entity` AUTO_INCREMENT=1;ALTER
TABLE
`customer_address_entity_datetime` AUTO_INCREMENT=1;ALTER
TABLE
`customer_address_entity_decimal` AUTO_INCREMENT=1;ALTER
TABLE
`customer_address_entity_int` AUTO_INCREMENT=1;ALTER
TABLE
`customer_address_entity_text` AUTO_INCREMENT=1;ALTER
TABLE
`customer_address_entity_varchar` AUTO_INCREMENT=1;ALTER
TABLE
`customer_entity` AUTO_INCREMENT=1;ALTER
TABLE
`customer_entity_datetime` AUTO_INCREMENT=1;ALTER
TABLE
`customer_entity_decimal` AUTO_INCREMENT=1;ALTER
TABLE
`customer_entity_int` AUTO_INCREMENT=1;ALTER
TABLE
`customer_entity_text` AUTO_INCREMENT=1;ALTER
TABLE
`customer_entity_varchar` AUTO_INCREMENT=1;ALTER
TABLE
`log_customer` AUTO_INCREMENT=1;ALTER
TABLE
`log_visitor` AUTO_INCREMENT=1;ALTER
TABLE
`log_visitor_info` AUTO_INCREMENT=1; -- Reset all ID countersTRUNCATE`eav_entity_store`;ALTER
TABLE
  `eav_entity_store` AUTO_INCREMENT=1; SET
FOREIGN_KEY_CHECKS=1;

After you have it executed, the test orders will not be in the database any more. Keep in mind that this willdelete ALL orders, in the database. So, you should execute this queries immediately after launch.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.