1

Can you guys give me an example of how a product alert e-mail can dispatch more than one product alert in a single e-mail ?

It seems to this point that each product a single customer is subscribed generates one e-mail, one for each product, and so the product collection on stock.phtml foreach loop always has only one product.

Thank you.

1 Answer 1

2

The e-mail is not sent immediately after a product gets back in stock (or the price is lowered).

There is a cron job that does the sending. You can configure the time when this runs from the backend.

Here is a scenario.
You subscribe for the stock alert for 2 products.
The products come back in stock both at the same time (or very close).
The next time the cron runs sees that you need to get 2 products in your e-mail and groups them both in the same e-mail.
See how the grouping is done in Mage_ProductAlert_Model_Observer::_processStock

11
  • Hi. I tested that scenario too. Each row was invoked individually for the same e-mail and I got 2 e-mails to registered user instead of one.
    – Niloct
    Commented Jul 23, 2014 at 13:44
  • @Niloct. Damn. Which version? I remember working with this a long time ago and it worked. I will test again.
    – Marius
    Commented Jul 23, 2014 at 13:46
  • 1
    Latest. But you may be right, I tested guest e-mails, which Amasty allows. Will try a registered user alert now.
    – Niloct
    Commented Jul 23, 2014 at 13:48
  • Well... I suspended cron altering crontab/jobs/catalog_product_alert/schedule/cron_expr, emptied stock of 2 products, added 2 notifications of same customer, restocked 2 products and reenabled cron, I got two e-mails.
    – Niloct
    Commented Jul 23, 2014 at 14:10
  • ok. I'll give it a shot myself and come back with the results.
    – Marius
    Commented Jul 23, 2014 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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