Mail alerts v4.0.0 - Customer notifications are not working



  • Hi everyone,

    I tested the Mail alerts module yesterday, both on my local dev setup and online on my real server and I couldn’t get the customer product availability email to work.

    1. I checked YES on the product availability tab.
    2. Went to a product and changed stock value to 0.
    3. Received an email to my merchant email address stating that the stocks were low for that item (perfect).
    4. Navigated to that product and entered my email to be notified when product is available again.
    5. Checked the module database table to make sure my email was added (and it was).
    6. Changed stocks back to 50 for that product.
      7.Waited for the notification email but it never came…
    7. Checked back into the database table and my email was gone, which means it got triggered but did nothing.

    I’m not sure if this module is complete or supposed to work yet, hence my question, should it be working and if so, what could be wrong on my end ?

    Thanks !!


  • administrators

    Update to 4.0.1. I noticed the module triggered some old bugs again and fixed those.



  • Thanks :-)


  • administrators

    You might have to retranslate the module though. I noticed that previous versions could eat the translations, then nag about how they are no longer available :/



  • Was just about to tell you that, I updated it and then all the strings went back in english (from french).

    I uninstalled then reinstalled and everything came back in french again.

    Also, for some reasons, I am still not receiving the customers notifications, just getting the out of stock notifications sent to the merchant. Tried on both dev and online, any idea ?


  • administrators

    Do you have the translated files in the /mails/ folder and/or /themes/<theme name/modules/mailalerts/mails/ folder?

    You’ll have to look for the files customer_qty.html and order_changed.html I think.



  • From what I can tell I seems to have them all. See screenshot.

    Productoutofstock and new_order are working fine. Customer_qty is not.

    0_1494532298824_Capture d’écran 2017-05-11 à 15.49.33.png


  • administrators

    What if you copy order_changed.html and order_changed.txt as well?

    It still doesn’t look right to me, tbh. The module is still “eating” translations.


  • administrators

    Module has been updated!



  • Thanks will give it a try and report !



  • OK, the new update was not working either BUT, I have identified and fixed the problems.

    I’m not sure I’ve did it the proper way but basically, this is a path issue in the modules/mailalerts/classes/MailAlert.php.

    The code is looking for file_exists(dirname(FILE).’/mails/’.$iso.’/customer_qty.txt’) but the ‘mails’ folder is located at the root of the module folder (not in classes/mails). I’ve fixed it by adding “/…” which now gives file_exists(dirname(FILE).’/…/mails/’.$iso.’/customer_qty.txt’).

    Here’s a screenshot of my fix: 0_1494601928809_Capture d’écran 2017-05-12 à 10.56.27.png.

    Works perfectly now but I also noticed that you can’t add these files to the theme since the code is not present like it is for the merchant alert email (see screenshot). 0_1494602110006_Capture d’écran 2017-05-12 à 11.14.43.png.

    Oh and one last thing, all the html files shows “powered by Prestashop at the end. “<span><a href=”{shop_url}” style=“color:#337ff1”>{shop_name}</a> powered by <a href=“http://www.prestashop.com/” style=“color:#337ff1”>PrestaShop™</a></span>"


  • administrators

    Thank you. That was very helpful. I have finished the rest of the check and updated the module.



  • You’re welcome sir, thanks to YOU ! :-)


Log in to reply
 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.