Jump to content

mail alert productsoutofstock


Recommended Posts

Hello everyone. I have that module , mailalerts , which alerts the website admin that a order was made or a product is out of stock and things like that.Well i have a problem with the productsoutofstock mail alert. At every order the admin receives an email with this message, product out of stock.In the module is configured to send the email if the quantity of the product is below 3.

It says you : reach the amount of 3 products. Remaining stock 0.

For every product which i order .. even in the back office the quantity of the products is huge.

This is the function:

public function hookProductOutOfStock($params)
{
 global $smarty, $cookie;
 if (!$this->_customer_qty)
  return ;
 $id_product = intval($params['product']->id);
 $id_product_attribute = 0;
 if (!$cookie->isLogged())
  $smarty->assign('email', 1);
 else
 {
  $id_customer = intval($params['cookie']->id_customer);
  if ($this->customerHasNotification($id_customer, $id_product, $id_product_attribute))
return ;
 }
 $smarty->assign(array(
  'id_product' => $id_product,
  'id_product_attribute' => $id_product_attribute));
 return $this->display(__FILE__, 'product.tpl');
}

and this is the productsoutofstock.txt

Hi,

 

The product {product} is soon out of stock.

Indeed, the breaking out of stock of {last_qty} has been exceeded.

Remaining stock : {qty}

 

You are advised to open the product's admin Product Page in order to replenish your inventory.

 

 

 

{shop_url} powered by PrestaShop™

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

  • 3 months 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...