Orders Cancel - Magento 2 module documentation
Author: Aurora Creation
Orders Cancel - Magento 2 module documentation
Module overview
The Orders Cancel module allows you to automatically cancel orders. Orders with statuses specified in the configuration are canceled after reaching the set deadline (e.g. 2 days) from the date of their submission.
Module compatibility
This module is compatible with Magento Community version 2.4.
How it works
Orders eligible for cancellation are collected by a cron job, which then builds a list of asynchronous operations and adds them to the job queue. Each single operation has a maximum of 100 orders to cancel. The module works with both database-based queuing and RabbitMQ.
Configuration
Stores > Settings > Configuration > Aurora > Orders Cancel
Enable Module - enable/disable the module.
Collect Orders To Cancel - allows you to specify how often the cron task will run.
Older Than X Days - the number of days from the order placement, after which the order can be canceled.
No Older Than X Days - orders older than the number of days specified in this field will be omitted. Leave this field blank for no limit.
Order Statuses - define the statuses of orders that can be canceled.
Add Order Status History Comment - enable/disable adding comments in the order status history when canceling them.
Order Status History Comment - the content of the comment added in the order status history.
Most of the options are in the store view scope, which allows, for example, to automatically cancel orders placed only in certain store views.
Installation
Via Composer
- Add the repository to composer.json:
"repositories": [
...
{
"type": "vcs",
"url": "git@git.auroracreation.com:aurora-modules/module-orders-cancel.git"
}
...
],
- Then add the dependency in composer.json:
"require": {
...
"aurora/module-orders-cancel": "*"
...
},
- In the Magento root folder, run the following commands:
composer update aurora/module-orders-cancel
php bin/magento module:enable Aurora_OrdersCancel
php bin/magento setup:upgrade
Manual
- Unzip the archive.
- Upload module files on your server to:
{Magento root}
└── app/
└── code
- In the Magento root folder, run the following commands:
php bin/magento module:enable Aurora_OrdersCancel
php bin/magento setup:upgrade
Changelog
v1.0.0
* Module init.