Jump to content

Mail alerts 2.4 error " You already have an alert for this product "


Recommended Posts

I am running PS 1.5.4.1 and found an error. Hopefully someone here can help fix it. Good news is, I think I know what is causing the error...just not sure what code needs to be changed.

 

On PS 1.5.4.1, running Mail Alerts module version 2.4.

 

If the customer is NOT logged in, a product that is currently out of stock correctly displays a "Notify me when available" button with a field for the non-logged in user to enter their email. This appears to run from: /modules/mailalerts/mailalerts.php and creates a table called: prefix_mailalert_customer_oos

 

For the first non-logged in user that enters their email for an out-of-stock product, it correctly creates a record in this table. The columns in the table are: id_customer, customer_email, id_product, id_product_attribute, id_shop.

 

A non-logged in user is given the 'id_customer' of "0". The problem lies here. If another non-logged in user attempts to enter their email, mailalerts throws back the error "You already have an alert for this product". Apparently, mailalerts is referencing the 'id_customer' AND 'id_product'. If a non-logged in user which is given the 'id_customer' of "0" has stored their email for that 'id_product', mailalerts is NOT allowing it to store another user's email address in 'customer_email' for the same product.

 

So, how can we get mailalerts to store multiple email addresses in 'customer_email' for non-logged in users in the 'id_customer'=0 and an 'id_product' has already been stored in the table?

 

I used phpMyAdmin to browse this table to figure this out. It was also handy to finally see what customers and how many are storing email alerts for what products. I wish there was a place in the BO to see this rather than logging in to phpMyAdmin. However, we need to get this code changed so it will store multiple non-logged in users to register their emails for the same OOS product.

 

Hopefully I was thorough enough to get some of the more advanced users on here the necessary data to offer some suggestions. Thanks, -Mark

Edited by kg4geq (see edit history)
Link to comment
Share on other sites

It actually looks like the change may need to occur in /modules/mailalerts/MailAlert.php

Anyone have a suggestion on how to store email mail alerts for multiple unsigned in users who have the id_customer=0 and the same id_product?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 3 months later...

Iam still having this problem. Using 1.5.6.1. If iam logged in, i cant see any option either to enter my email address to receive notifications. Its only visible for guest accounts.

 

Edit : Uninstalling old module and installing new one solved the problem for me.

Edited by indus (see edit history)
Link to comment
Share on other sites

  • 2 years later...

Hello, please use this module for v1.5.5 . It is updated and should solve the issue.

 attachicon.gifmailalerts.zip

I don't know why, it shows me 404 when I want to download. Can you provide me link directly do download?

Did that work for you with guest notification bug? Alle files should I replace or only couple of them?

Thank you,

Regards, Tom

Link to comment
Share on other sites

×
×
  • Create New...