<!-- TITLE: Orders Cancel - Magento 2 module documentation --> <!-- SUBTITLE: 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. ![Image1](/uploads/orders-cancel/image-1.png "Image1") ## Installation ### Via Composer 1. Add the repository to composer.json: ```text "repositories": [ ... { "type": "vcs", "url": "git@git.auroracreation.com:aurora-modules/module-orders-cancel.git" } ... ], ``` 2. Then add the dependency in composer.json: ```text "require": { ... "aurora/module-orders-cancel": "*" ... }, ``` 3. In the Magento root folder, run the following commands: ```text composer update aurora/module-orders-cancel php bin/magento module:enable Aurora_OrdersCancel php bin/magento setup:upgrade ``` ### Manual 1. Unzip the archive. 2. Upload module files on your server to: ```text {Magento root} └── app/ └── code ``` 3. In the Magento root folder, run the following commands: ```text php bin/magento module:enable Aurora_OrdersCancel php bin/magento setup:upgrade ``` ## Changelog ### v1.0.0 * Module init. ## Thank you for your interest in our products!