Jump to content

Hide Stock Warnings on the Admin Page for Disabled Products


Guest bluesphee

Recommended Posts

Guest bluesphee

This may come in handy for someone...

I wanted to hide the stock warnings that show up in the admin home page if the product was marked to disabled. To make this change I just had to modify both SELECT statements in the home/index.inc.php file. The code was changed to look like this:


if ($config['stock_warn_type'] == 1) {

	$query = "SELECT name, stock_level, productId FROM ".$glob['dbprefix']."CubeCart_inventory WHERE useStockLevel = 1 AND stock_level <= stockWarn AND disabled != 1 ORDER BY stock_level ASC"; 

} else {

	if (!is_numeric($config['stock_warn_level'])) $config['stock_warn_level'] = 5;

	$query = "SELECT name, stock_level, productId FROM ".$glob['dbprefix']."CubeCart_inventory WHERE useStockLevel = 1 AND stock_level <= ".$config['stock_warn_level']." AND disabled != 1 ORDER BY stock_level ASC"; 

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...