Jump to content

Out of stock mail alert box stays visible on in stock items


ol1

Recommended Posts

Hi!

 

When I enable the mail alerts module for out of stock items it also stays visible for in stock items and combinations (asking users to leave an email address to get an alert when the item is back in stock, when it's already in stock). How do I leave it visible only for out of stock items and combinations and hide it for all the in stock items and combinations? I'm on 1.4.9.

Please help! Thanks!

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

  • 1 month later...

I am on prestashop 1.5.4 and have the same problem. Mail Alerts is showing the "Notify me when available" button even when the item is in stock.

 

I read a thread saying someone solved this and that it disappears if the product has "attributes". But I think the error is in the code that it is not hiding the button if the item is in stock because it is not checking the table: ps_product_available id_product quantity field.

 

Can someone please help modify this code so it doesn't appear if the item is in stock? Please :)

Link to comment
Share on other sites

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

I am having the same issue.  It only happens if I am logged in as a customer.   If I log out while on the product page, the text link goes away when the page refreshes.  After reading this thread, I performed a little test.  I set the theme to the default and the problem exists for the default theme as well.  I am not really good with code, but I am looking into it.  If anyone else can weigh in here, I would be thankful.

Link to comment
Share on other sites

I solved my issue. I noticed there was also a link to 'Add your review' in the same div just above the notification link on the product page. I deleted ProductComments from the out-of-stock hook and now the notification link displays only when it should. Maybe this will help anyone else with a similar issue?

Link to comment
Share on other sites

  • 2 months later...

Hi Debra

I also had this problem with the mailalerts module and have noticed that it disappears if I disable the productcomments module. How did you fix this? I'd still like to have the productcomments module installed alongside the mailalerts module!

 

Thanks

Gary

Link to comment
Share on other sites

  • 4 weeks later...

Hi Gary,

 

I still have the Product Comments module.  I just removed it from the ProductOutOfStock hook.  I have Product Comments in the following hooks:

displayHeader

displayProductComparison

displayProductTab

displayProductTabContent

 

I probably do not need it in all of those places. I am just afraid to start deleting it since it works for now.  I hope my answer helps.  Sorry it took so long for me to respond.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...