Jump to content

Mail alerts 2.4 not working correctly ps 1.5.4.1 showing notify when in stock


Recommended Posts

I installed mail alerts 2.4 on my version of prestashop 1.5.4.1. The notification correctly sends. However, the "notify me when available" button appears even when the item is in stock.

 

I read through lots of forums and tried installing the latest version from github, but it still shows when I have an item that has quantity in stock.

 

any suggestions? thanks, -Mark

Link to comment
Share on other sites

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

Hello to all, I have the same problem and fix this with a small change to the file mailalerts.php in the modules/mailalerts folder.

The original code is:

 

public function hookActionProductOutOfStock($params)
{
        if (!$this->_customer_qty || !Configuration::get('PS_STOCK_MANAGEMENT') || Product::isAvailableWhenOutOfStock($params['product']->out_of_stock))
                return;

The change is this:
 

public function hookActionProductOutOfStock($params)
{
        if ((isset($params['product']->quantity) && $params['product']->quantity > 0) || !$this->_customer_qty || !Configuration::get('PS_STOCK_MANAGEMENT') || Product::isAvailableWhenOutOfStock($params['product']->out_of_stock))
                return;
  • Like 1
Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...