magenizr / magento2-deleteorders
This Magento 2 modules allows admin users to delete orders with all related information such as invoices, shipments and credit memos.
Fund package maintenance!
Patreon
Installs: 875
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
Type:magento2-module
This package is auto-updated.
Last update: 2024-12-27 22:20:23 UTC
README
Delete Orders
This Magento 2 modules allows admin users to delete orders including all related information such as invoices, shipments and credit memos via backend, command-line or REST API only.
Business Value
A admin user can delete unwanted orders ( e.g test orders ) without having a developer / agency involved.
- A client support team, which usually has no access to the MySQL database can delete orders without having a developer involved.
- Practical for small businesses, which can not afford expensive agency support.
Features
-
A new option
Delete
to theActions
dropdown in theSales > Orders
grid. -
CLI command called
magenizr:order:delete
. -
REST API endpoint
/V1/order/:orderId
. -
A list
Restrict Order Status
inStores > Configuration > Magenizr > Delete Orders
allows the admin user to limit the delete feature to specific order statuses only. -
A drop down
Availability
that can be used to limit the availability toBackend
,Command-Line
,REST API
orAll
. -
It clears all related order information which are stored in the following tables.
sales_invoice, sales_invoice_grid, sales_shipment, sales_shipment_grid, sales_creditmemo, sales_creditmemo_grid
- The functionality can be restricted to specific roles via
System > Permissions > User Roles
. The ACL resource isStores > Configuration > Delete Orders
. - The configuration can be found in
Stores > Configuration > Magenizr > Delete Orders
.
Usage
- Once the module is installed and enabled, a new option
Delete
in the dropdownActions
is available onSales > Orders
. Once the popup messageAre you sure you want to delete selected items?
is confirmed, the module will deleted selected items and display a success messageTotal of X order(s) were deleted successfully.
. - On command-line
magenizr:order:delete
can be used to delete one or multiple ( comma separated ) order ids. For example:
bin/magento magenizr:order:delete 100000001
bin/magento magenizr:order:delete 100000001,100000002,100000003
bin/magento magenizr:order:delete 000000001,34234
Order ID 000000001 successfully deleted.
Order ID 34234 does not exist.
- Via REST API simply git the endpoint
/V1/order/:orderId
and methodDELETE
.
System Requirements
- Magento 2.4.x
- PHP 7.x, 8.x
Installation (Composer 2)
- Update your composer.json
composer require "magenizr/magento2-deleteorders":"1.1.0" --no-update
- Use
composer update magenizr/magento2-deleteorders --no-install
to update your composer.lock file.
Updating dependencies
Lock file operations: 1 install, 1 update, 0 removals
- Locking magenizr/magento2-deleteorders (1.1.0)
- And then
composer install
to install the package.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 1 install, 0 update, 0 removals
- Installing magenizr/magento2-deleteorders (1.1.0): Extracting archive
- Enable the module and clear static content.
php bin/magento module:enable Magenizr_DeleteOrders --clear-static-content
Installation (Manually)
- Download the latest version of the source code.
- Extract the downloaded tar.gz file. Example:
tar -xzf Magenizr_DeleteOrders_1.1.0.tar.gz
. - Copy the code into
./app/code/Magenizr/DeleteOrders/
. - Enable the module and clear static content.
php bin/magento module:enable Magenizr_DeleteOrders --clear-static-content
Support
If you experience any issues, don't hesitate to open an issue on Github.
Purchase
This module is available for free on GitHub.
Contact
Follow us on GitHub, Twitter and Facebook.
History
===== 1.1.0 =====
- 2.4.6 compatibility tested
- REST API Support
<route url="/V1/order/:orderId" method="DELETE">
- Code cleanup
===== 1.0.2 =====
- Test 2.4.5 compatibility
- Remove constraints in composer file
- Change wording
===== 1.0.1 =====
- Command name renamed from magenizr:deleteorders to magenizr:order:delete
===== 1.0.0 =====
- Stable version