I have tested the functionality of product alerts on Magento 2.4.5-p2 running on PHP 8.1. I have created the conditions for product alerts as described below:
At the admin back-end, I was able to see the alerts registered for the product at the section "Product Alerts". Also, I verified the relevant entries at the database tables "product_alert_price", "product_alert_stock". However, the column "status" has 0 value for those very entries, and of course on emails were received. The cron is running and modules Magento_InventoryProductAlert and Magento_ProductAlert are enabled.
Solved! Go to Solution.
I found the solution myself. Magento requires that STORES > Settings > Configuration > Catalog > Inventory > Stock Options > Display Out of Stock Products = Yes, otherwise no product alerts are sent, at all.
I can understand this very requirement for out-of-stock products, as if the store does not display them, no subscriptions can be really made for back-in-stock alerts. If the out-of-stock products are not displayed, the only way to find them, and subscribe for back-in-stock alerts is to know the URL of the product, or accidentally find its URL via Google / Bing search.
However, I cannot understand this very requirement for Price Drop alerts. These very alerts could be sent by Magento without the requirement of Display Out of Stock Products = Yes.
I found the solution myself. Magento requires that STORES > Settings > Configuration > Catalog > Inventory > Stock Options > Display Out of Stock Products = Yes, otherwise no product alerts are sent, at all.
I can understand this very requirement for out-of-stock products, as if the store does not display them, no subscriptions can be really made for back-in-stock alerts. If the out-of-stock products are not displayed, the only way to find them, and subscribe for back-in-stock alerts is to know the URL of the product, or accidentally find its URL via Google / Bing search.
However, I cannot understand this very requirement for Price Drop alerts. These very alerts could be sent by Magento without the requirement of Display Out of Stock Products = Yes.
Besides the requirement of setting STORES > Settings > Configuration > Catalog > Inventory > Stock Options > Display Out of Stock Products = Yes, otherwise no product alerts are sent, at all, there is another problem that should be checked. This is the user that you probably use for testing. Product alerts is a service that the user should subscribe; i.e. it is not like the email notifications sent upon placing an order. So, if the user has unsubscribed from the newsletter of the store, which is considered as a general subscription for Magento news, promotions etc, they could still register for product alerts associated with specific products, but Magento will not finally send them any messages.
These two problems (Display Out of Stock Products = Yes and Newsletter subscription) cost me days of searching and testing. Of course the first thing you should search are the Magento configuration regarding the Product Alerts and the case that you need the patches ACSD-48366 and ACSD-50336.