November 8, 2013

Magento Product stock back alerts (Out of Stock Notification) Not Working

Magento having a good process that if a product is out of stock then there should be a link for product notification. when the product back in stock it will send a mail to user.

To set up Magento Product Alerts please go to System > Configuration > Catalog > Product Alerts then select Yes to "Allow Alert When Product Comes Back in Stock" field.

Set out of status for any product and back to front end you see link to subscribe stock notify

Magento product stock back alert
Magento product stock back alert link

When user logged in and click to "Sign up to get notified when this product is back in stock" link, the user email will store in product alert table in Magento. Set in stock for this product in admin, an email will be send to user subscribed. Actually, email not send. Why????

After research I see config.xml file in Product Alert Module (app\code\core\Mage\ProductAlert\etc\config.xml) not set schedule for cronjob:

<crontab>
        <jobs>
            <catalog_product_alert>
                <run>
                    <model>productalert/observer::process</model>
                </run>
            </catalog_product_alert>
        </jobs>
  </crontab>
Just fix as well:

<crontab>
        <jobs>
            <catalog_product_alert>
                <schedule>
                    <cron_expr>*/5 * * * *</cron_expr>
                </schedule>
                <run>
                    <model>productalert/observer::process</model>
                </run>
            </catalog_product_alert>
        </jobs>
</crontab>


Bonus:


1.  Similar function to notify customer when product price changes
2. Custom design for Product stock back alerts function:

Magento product stock back alert custom design
Magento product stock back alert custom design