2

The Mage_ProductAlert module sends product alerts to customers and updates the sent records in the tables product_alert_price and product_alert_stock. However, I was looking for any processes that remove old records but couldn't find anything related to that respect. Are these records ever removed once their corresponding emails are sent?

1

Assuming, magentos modularization is good on this extension (Mage_ProductAlert), no they are never deleted. If you search the module for delete you get a few results in the UnsubscribeController - when the customer deletes manually.

Automatically I can not find anything.

And while reading the code I found a bug:

\Mage_ProductAlert_UnsubscribeController::priceAllAction
public function priceAllAction()
{
    $session = Mage::getSingleton('customer/session');
    /* @var $session Mage_Customer_Model_Session */

    try {
        Mage::getModel('productalert/price')->deleteCustomer(
            $session->getCustomerId(),
            Mage::app()->getStore()->getWebsiteId()
        );
        $session->addSuccess($this->__('You will no longer receive price alerts for this product.'));

This success message should be You will no longer recieve price alerts. because the code deletes them all, not only for one product :D

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.