Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Stock levels -> Inventory Report Stock Level - code does not exist?


themilkman

Recommended Posts

Hi

 

I am trying to install Inventory Report Stock Level, beta V1.5, http://addons.oscommerce.com/info/3101.

 

In the instructions it say that in admin/index.php to do the following; but the following code does not even exist. What should be done here?

 

Thnaks

 

 

AFTER:

 

$box = new box;

echo $box->menuBox($heading, $contents);

 

echo '<br>';

 

$customers_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS);

$customers = tep_db_fetch_array($customers_query);

$products_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1'");

$products = tep_db_fetch_array($products_query);

$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS);

$reviews = tep_db_fetch_array($reviews_query);

 

 

ADD:

 

// BEGIN Low Stock Warning MOD

if (STOCK_CHECK == 'true') {

$stock_query_raw = "select p.products_id, p.products_quantity, p.products_reorder, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_quantity <= p.products_reorder";

$stock_query = tep_db_query($stock_query_raw);

 

$totalRestock = 0;

while($stock = tep_db_fetch_array($stock_query)) {

$totalRestock++;

}

if ($totalRestock > 0) {

$totalRestock = $totalRestock++;

} else

$totalRestock = 'NONE';

}

 

if (STOCK_CHECK == 'false') {

$totalRestock = '<font color="FF0000">Not Active</font>';

}

// END Low Stock Warning MOD

Whats the point of a signature?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...