Generating a feed returns an error "There are no products to generate the feed". How to fix this issue?

Generating a feed returns an error "There are no products to generate the feed". How to fix this issue?

This is one of the common errors, yet the troubleshooting process is quite simple.



First, double-check the settings in the General and Conditions tabs in order to make sure that those configurations are valid and do not contradict each other.

General tab: 



Conditions tab: 


   
Once the feed's settings and conditions are verified to be valid, please proceed to the module's indexers in System → Index Management. The Amasty Feed Rule and Amasty Feed Products indexers should be in the Ready status in order to proceed with the feed generation:



      If these indexers are in the Processing status, it is required to reset and reindex them from the CLI with the following commands:
php bin/magento indexer:reset amasty_feed_product
php bin/magento indexer:reset amasty_feed_entity
 
php bin/magento indexer:reindex amasty_feed_product
php bin/magento indexer:reindex amasty_feed_entity

In case you use scheduled generation of the feed, we recommend switching the indexers to the Update On Save mode, as the schedule of the feed's generation may overlap the schedule of the indexers' update, causing the error.

As a result, it should be possible to generate the same feed manually and by schedule without any problems.