Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Archive, remove and cleanup

The three ways orders leave the order list in Exponential and what each does to the data - archiving, removing a single order, and the shop cleanup that deletes every order - with their audit events, the basket and…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/e-commerce/orders/archive-remove-and-cleanup.md

On this page

Archive, remove and cleanup

This page is for store managers, merchants and administrators who keep the order list manageable. Orders can leave the list in three very different ways. Two of them destroy data that may be needed for accounting, customer questions or data protection requests, so it pays to know exactly what each does.

Contents

  1. Three ways, side by side
  2. Archiving
  3. Removing an order
  4. The shop cleanup script
  5. Baskets and wishlists
  6. A retention practice

Three ways, side by side

ArchiveRemove one orderShop cleanup
WhereOrder list, Archive button (shop/archiveorder)shop/removeorder after confirmationupdate/common/scripts/cleanup.php shop
Policyshop/administrateshop/administrateshell access
Order dataKept; is_archived set to 1DeletedEvery order deleted
ReversibleYes, shop/unarchiveorderNoNo
StatisticsArchived orders still countGoneGone
Audit eventcommerce.order.archive / .unarchivecommerce.order.deletecommerce.order.purge

Archiving

eZOrder::archiveOrder() only sets a flag. The order disappears from the order list and appears in Store > Archive (shop/archivelist); its items, totals, status and history stay. Archive orders once they are finished, so the order list shows only work to do. The customer's own order list and receipts keep working.

Removing an order

shop/removeorder asks for confirmation and then calls eZOrder::cleanupOrder() for each selected order, which deletes the order row, its product collection and product lines, and its status history (kernel/classes/ezorder.php). The order list of the standard design no longer shows a remove button (the code keeps the old RemoveButton for compatibility, kernel/private/classes/views/shop/orderlist.php), so removal is a deliberate step.

Remove an order only when it must not exist: a test order on a live site, or data you are legally obliged to erase and have no obligation to keep. For data protection requests, follow Data export and erasure and record the request in your log (GDPR request log template).

The shop cleanup script

update/common/scripts/cleanup.php with the name shop removes all baskets, all wishlists and all orders (eZBasket::cleanup(), eZWishList::cleanup(), eZOrder::cleanup()). It is meant for test and development databases, for example before handing over a store whose test orders must go. Never run it on a live store. Take a backup first even on a test copy (Backups and restores).

Baskets and wishlists

DataRemoved byWhen
Baskets of expired sessionsbasket_cleanup.php cron script, part infrequentAs site.ini [Session] BasketCleanup* says (site.ini shop settings walkthrough)
WishlistsOnly by the customer, or by the shop cleanup scriptNever automatically
Temporary ordersNot removed by basket cleanupNever shown as orders (Temporary orders and activation)

A retention practice

  1. Decide with your accountant how long order records must be kept, and with your data protection adviser how long customer data may be kept.
  2. Archive finished orders weekly (Store weekly checklist).
  3. Once a year, review archived orders older than the retention period (Operations calendar).
  4. Before removing anything, make sure the figures you need are kept elsewhere: monthly statistics, the accounting system (Store figures and exports).
  5. Remove in small, recorded batches, and check the audit trail afterwards.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x