Disable expired and out-of-stock products automatically

  • Updated

In the configuration, you can activate a setting that hides products from customers when they are out of stock. This function depends on a scheduled job that runs every 30 minutes.

For a product to be hidden automatically, the following conditions must be met:

  1. The product has passed its unpublished date.
  2. The product has an inventory (including reservations) of 0 or less.

Activate the setting in configuration

  1. Navigate to configuration -> products -> inventory
  2. Enable the setting “Disable expired and out-of-stock products automatically”

Set up the scheduled task

  1. Navigate to configuration -> advanced -> scheduled task



  2. Click on the three ellipsis and click "Add."



  3. Search for productinventory in the implementation type, and set the schedule to */30 * * * * to ensure the job runs every 30 minutes.



Setting the unpublished date 

To set the unpublished date, follow these steps:

  1. Go to Products in the navigation menu.
  2. Select the desired product -> edit product -> settings



  3. Set an unpublished date for the product.

 

 4. The product will now be automatically deactivated when the inventory reaches 0.

 

 

Note: If a product does not have an unpublished date, automatic deactivation will be ignored for that product.

 




Was this article helpful?