Well may have a code way to do this... Could create a file in your admin directory:
Say call it
disable_category.php
to "activate" whichever option chosen below, then once logged into the admin goto/open:
admin/disable_category.php?cat_disable=10
to perform the applicable action from below for the category and all of the product below it that has the category_id of 10...
Code:
<?php
require('includes/application_top.php');
$prod_list = array();
if (isset($_GET['cat_disable']) && $_GET['cat_disable'] != '' && is_numeric($_GET['cat_disable'])) {
$cat_to_disable = $_GET['cat_disable'];
} else {
$cat_to_disable = false;
}
if ($cat_to_disable !== false) {
$prod_list = zen_get_categories_products_list($cat_to_disable);
}
foreach ($prod_list as $prod_id => $cat) {
$db->Execute('update ' . TABLE_PRODUCTS . ' p set p.products_status = 0 where p.products_id = ' . (int)$prod_id);
}
Or you could disable the product category which would disable the product...
This will disable the product from view (in a default install). If instead you want to set the quantity available to 0 and you have your store setup to not disable the product when quantity is 0, then:
Code:
<?php
require('includes/application_top.php');
$prod_list = array();
if (isset($_GET['cat_disable']) && $_GET['cat_disable'] != '' && is_numeric($_GET['cat_disable'])) {
$cat_to_disable = $_GET['cat_disable'];
} else {
$cat_to_disable = false;
}
if ($cat_to_disable !== false) {
$prod_list = zen_get_categories_products_list($cat_to_disable);
}
foreach ($prod_list as $prod_id => $cat) {
$db->Execute('update ' . TABLE_PRODUCTS . ' p set p.products_quantity = 0 where p.products_id = ' . (int)$prod_id);
}
Or... If you replace the call_for_price icon with your out-of-stock notification, then:
Code:
<?php
require('includes/application_top.php');
$prod_list = array();
if (isset($_GET['cat_disable']) && $_GET['cat_disable'] != '' && is_numeric($_GET['cat_disable'])) {
$cat_to_disable = $_GET['cat_disable'];
} else {
$cat_to_disable = false;
}
if ($cat_to_disable !== false) {
$prod_list = zen_get_categories_products_list($cat_to_disable);
}
foreach ($prod_list as $prod_id => $cat) {
$db->Execute('update ' . TABLE_PRODUCTS . ' p set p.product_is_call = 1 where p.products_id = ' . (int)$prod_id);
}
This will set the product to still being "available" (shown on screen) but requires calling for price instead of providing a price.