Remove search box from empty category
When you have 'Main Categories' (in the 'Catalog Setup' of the storeadmin area) set to 'Products' or 'Both', and you select a category with no products in it, you will see the message:
Sorry, but there are no products matching this criteria. Please try again.
To remove the search box and change the message:
-
Option 1: Change 'Main Categories' in the 'Catalog Setup' to 'Categories'. (Note: Only subcategories will appear under a main category - products assigned to that category will now show.)
- OR -
-
Option 2: Keep the settings as-is, and instead, modify the files to remove the search box:
-
Open the catalog.php file in the /enc/ folder.
-
Find the following code (around line 143):
echo "
Sorry, but there are no products matching this criteria. Please try again.
"; include(SB_HOME_PATH ."/" .SB_INC_DIR ."/search.php"); -
Change these lines to:
echo <<
Sorry, but there are no products matching this criteria. Please try again. END; // include(SB_HOME_PATH ."/" .SB_INC_DIR ."/search.php"); -
Now just change the lines:
Sorry, but there are no products matching this criteria. Please try again.
to whatever text you'd like to display.
-
Save and reload the file.
-