Wholesale categories show on main catalog page (v. 2.93)

In 2.93, when viewing the main catalog page, categories marked as wholesale only (i.e. Display = 'WS Only' in the category administration) still appear. To correct this:

  1. Open the products_maincat.php file in the /enc/ folder.

  2. Add the code:

    // RETAIL ONLY
    if ($ws_logged_in != 'y' AND !defined('SB_WSONLY_VAL') AND defined('SB_VERSION') AND substr(SB_VERSION, 0, 3) == '2.9' AND $use_29 == 'y')
    $maincatquery .= "AND WSOnly='No' ";

    just above the code:

    $maincatquery .= "AND Active='Yes' ORDER BY CatOrder, Category";