Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / How to omit certain items from the low stock email

How to omit certain items from the low stock email

Locked

Views: 882

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
21 Apr 2008, 7:33 PM
#1
skirkpatrick avatar

skirkpatrick

New Zenner

Join Date:
Jan 2008
Posts:
8
Plugin Contributions:
0

How to omit certain items from the low stock email

I have been looking for a way to omit certain items from the low stock email that is sent out of the site.

For instance:

Items

1000
1001
1002
1003
1004
1005

are all single items - Item 1000P is a package that contains items 1000 - 1005.

The 1000P package can only be made up of in stock item as they are put together at the time of the order so they stock level is always very low.

I would like to use a "AND m.products_model NOT LIKE '%%P'" in the sql statement but I do not know where to find the statement.

Any help is greatly appreciated,

Steve

24 Apr 2008, 6:08 PM
#2
skirkpatrick avatar

skirkpatrick

New Zenner

Join Date:
Jan 2008
Posts:
8
Plugin Contributions:
0

Re: How to omit certain items from the low stock email

I found the solution: order.php

I added
. "' AND p.products_model NOT LIKE '%P'"
to the end of this sql statement.

// lowstock email report
$this->email_low_stock='';

for ($i=0, $n=sizeof($this->products); $i<$n; $i++) {
  // Stock Update - Joao Correia
  if (STOCK_LIMITED == 'true') {
    if (DOWNLOAD_ENABLED == 'true') {
      $stock_query_raw = "select p.products_quantity, pad.products_attributes_filename, p.product_is_always_free_shipping
                          from " . TABLE_PRODUCTS . " p
                          left join " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                           on p.products_id=pa.products_id
                          left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
                           on pa.products_attributes_id=pad.products_attributes_id
                          WHERE p.products_id = '" . zen_get_prid($this->products[$i]['id']) . "' AND p.products_model NOT LIKE '%P'";