1. Home
  2. Docs
  3. Automatic Order Cancellation (M2)
  4. Backend Settings of the Extension
Download PDF

Backend Settings of the Extension

Enable the Extension
General Configuration

  • Navigate to Stores > Configuration > Sunarc > Order Auto Cancel on Magento admin panel.
  • Enable: Choose ‘Yes’ to enable Automatic Order Cancellation extension.
  • Payment Methods: The selected payment method(s) orders will be canceled.
  • Order Status: The selected order status will be canceled.
  • Order Consider After: Order will be canceled after the selected date.
  • Duration: Enter time period of cancellation.
  • Unit: Mention the unit (Minutes, Hours, Days)for the duration set in the above column.

Eg. If the duration is set as ‘7’ and unit as ‘Days’ then the orders will be auto canceled after 7 days of selected ‘Order Consider After’ date.

Cancelled Order History
On Magento admin panel, navigate to Order Auto Cancel > Cancelled Order History it displays the history of action log of all orders canceled by the extension.

Please note that the cancelation work depends on the cron schedule of your site.
Create the cron job
To create a cron job, enter the following command as a user with root privileges:
crontab -e
A text editor displays. (You might need to choose a text editor first.)

* * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v “Ran jobs by schedule” >> <magento install dir>/var/log/magento.cron.log
* * * * * <path to php binary> <magento install dir>/update/cron.php >> <magento install dir>/var/log/update.cron.log
* * * * * <path to php binary> <magento install dir>/bin/magento setup:cron:run >> <magento install dir>/var/log/setup.cron.log

where,
<path to php binary> is the absolute file system path to your PHP binary
<magento install dir> is the directory in which you installed the Magento software;
for example, /var/www | grep -v “Ran jobs by schedule” filters this message from the log, making any errors easier to spot.

Download Guide
Was this article helpful to you? Yes No

How can we help?