This was discovered in a fresh install of 1.5.6c after installing the Mod List plug in. No categories or products were installed at the time.
Installing the Mod List mod (should be core in my opinion) gives the admin a look at added mods, configurations, and tables. One of them that shows up with a new install of 1.5.6c is a listing for Page Name 'Category' with a menu_key of 'catalog' and a display of 'N'.
This admin_page is created by line 2146 of the mysql_zencart.sql contains
Code:
('categories', 'BOX_CATALOG_CATEGORY', 'FILENAME_CATEGORIES', '', 'catalog', 'N', 18),
Having the install sql create this page_key will not be known to a user UNTIL the Mod List plug in is installed. The display_on_menu setting of 'N' means the user will not see the choice. Loading the Mod List mod DOES show the link and, when clicked, takes the user to the admin/categories.php page. The page presents itself fully including the footer but, there is no information on the page. At first, I thought, "where are the categories?" With no categories created, my next thought was, "Why doesn't it give me the option to create a category?"
Apparently, a fresh install creates an admin_page that is not used nor normally shown to the admin.
Then, I looked at an upgrade from 1.5.5f to 1.5.6c.
If someone were to upgrade from 155f to 1.5.6c, the mysql_upgrade_zencart_156.sql lists (starting at line 164)
Code:
## alter admin_pages for new product listing pages#NEXT_X_ROWS_AS_ONE_COMMAND:6
UPDATE admin_pages
SET language_key = 'BOX_CATALOG_CATEGORY',
main_page = 'FILENAME_CATEGORY_PRODUCT_LISTING',
display_on_menu = 'N',
sort_order = 18
WHERE page_key = 'categories';
Note that both the clean 1.5.6c install and the upgrade admin_pages are set to NOT show up as a menu choice.
Also, the upgrade changes the main_page to 'FILENAME_CATEGORY_PRODUCT_LISTING'
This already exists in the admin_pages table in page_key categoriesProductListing with BOX_CATALOG_CATEGORIES_PRODUCTS as the language_key. And, this page_key is set to display in the Catalog Menu.
As I can't seem to find any use for the categories admin_page or the admin/categories.php, I'm wondering if they were left over from something previously changed or is there some use I am not seeing.
Regardless, I think something needs to be done to not have this listing show with the Mod List mod. Changing the install/upgrade sql files would seem to be the better choice.
I can just imagine the panic of a store owner with 100s of products after clicking on the Category link in Mod List. "Where are my products!?!?"
Bookmarks