Just to tidy up John's beautiful mod
http://forum.x-cart.com/viewtopic.php?t=11326
I have successfully applied it to X-Cart 4.0.17 with X-Fancy-Category
All that needed to be done is:
/skin1/admin/category_modify.tpl
Find:
Code:
<SELECT name="avail">
<OPTION value='Y' {if ($current_category.avail eq 'Y')} selected {/if}>{$lng.lbl_enabled}</OPTION>
<OPTION value='N' {if ($current_category.avail eq 'N')} selected {/if}>{$lng.lbl_disabled}</OPTION>
</SELECT>
Replace with:
Code:
<SELECT name="avail">
<OPTION value='Y' {if ($current_category.avail eq 'Y')} selected {/if}>{$lng.lbl_enabled}</OPTION>
<OPTION value='N' {if ($current_category.avail eq 'N')} selected {/if}>{$lng.lbl_disabled}</OPTION>
<OPTION value='H' {if ($current_category.avail eq 'H')} selected {/if}>Hidden</OPTION>
</SELECT>
and
/include/categories.php
Find:
Code:
if ($current_area == "C" || $current_area == "B")
$search_condition = "AND avail='Y' AND (membership='".addslashes($user_account["membership"])."' OR membership='')";
Replace with:
Code:
if ($current_area == "C" || $current_area == "B")
$search_condition = "AND (avail='Y' OR avail = 'H') AND (membership='".addslashes($user_account["membership"])."' OR membership='')";
Hope you find this helpful.
HK