Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Categories not listing in admin > catalog > categories section

Categories not listing in admin > catalog > categories section

Locked

Views: 2,166

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
16 Nov 2006, 2:36 AM
#1
kaleco avatar

kaleco

New Zenner

Join Date:
Jul 2005
Posts:
4
Plugin Contributions:
0

Categories not listing in admin > catalog > categories section

I just installed Zen Cart on a new host, installed the Easy Populate plugin and uploaded all my existing products. When I checked my site, all was well. Products are correctly listed. However, when I go to the admin panel > catalog > categories to add category images, I am unable to get a listing of categories or products.

The page begins loading, then stops without any error. The HTML isn't completed when I checked the page source. It's not a normal timeout either, it's as if it just gives up. I've attached a screen grab to show how far I get.

I'm sure I've missed something obvious here. All products are in the database as they should be, confirmed with phpMyAdmin. Any help would be appreciated, thanks.

16 Nov 2006, 2:42 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Categories not listing in admin > catalog > categories section

How many categories and products do you have?

How many records are in the table:
products
products_description
categories
categories_description
products_to_categories

16 Nov 2006, 1:36 PM
#3
kaleco avatar

kaleco

New Zenner

Join Date:
Jul 2005
Posts:
4
Plugin Contributions:
0

Re: Categories not listing in admin > catalog > categories section

There are lots of each, at the client's request.
3,029 in _products,
14,313 in _categories :o

Category number is high because some products are 7 categories deep. In the near future, I need to find a way to have, say, a single BMW category which contains all BMW parts, and is a subcategory of each main category such as 'Exhausts' and 'Suspension', only showing the relevant records for each.

I imagine the current solution is not the most efficient database design, but it's working as intended on another server (which I'll link to if necessary). That said, the categories admin page takes a while to load there, longer than this host takes before it gives up.

During install, I was warned that PHP is using the CGI, which could cause 'unexpected problems'.

18 Nov 2006, 4:48 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Categories not listing in admin > catalog > categories section

One main issue on this is the server and how it is configured for php and MySQL in regard to memory and cache ... and in plain performance ...

What runs at .5 seconds on one server can run at 45 seconds on another ...

That said, let's explore how to speed up your page ...

Try to go to the Categories/Products, then wait for the time out ...

Peek in your temp directory for your browser ( sort by date to find it fastest, it's the monster file you see in there ) and you can see how huge this page is as a temp file from the browser ... this is why you time out ... it has to download for you to see it ...

For giggles and grins turn on your Parse times ... they will eventually be able to display ...

These are things that speed up the Categories/Products when you have a built like your's ...

Try them one at a time to see which effects you the most ...

Turn off the Categories Count in the Admin:
Configuration ... My Store ...

Show Category Counts - Admin
Show Category Counts in Admin?

true
false

Test speed ...

Note: with the next several changes, try this with that setting ON and OFF to see the relative effect of "where" the slow down really is ...

Note: there are no overrides for this so maintain a backup of the original and changed files for the future ...

Edit the file:
/admin/includes/modules/category_product_listing.php

Next, try turning off the Categories Dropdown ... your's is very huge and trying to draw it is 32,000+ rows ... :eek:

Change around lines 16-18:

if (!isset($_SESSION['display_categories_dropdown'])) {
  $_SESSION['display_categories_dropdown'] = 0;
}

To read:

if (!isset($_SESSION['display_categories_dropdown'])) {
  $_SESSION['display_categories_dropdown'] = 1;
}

That shuts off the dropdown ... building it is not so much the issue as displaying and downloading it ... a 32,000+ dropdown is a monster ...

Test speed ...

Around lines 165 - 167 change:

      if (zen_get_products_to_categories($categories->fields['categories_id'], true, 'products_active') == 'true') {
        echo '  ' . zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED);
      }
// turned off for speed
if (false) {
      if (zen_get_products_to_categories($categories->fields['categories_id'], true, 'products_active') == 'true') {
        echo '  ' . zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED);
      }
}

Test speed ...

After testing these, let us know where you are at and we can look at other issues ... have fun! :lamo:

13 Aug 2009, 5:31 PM
#5
abran1984 avatar

abran1984

New Zenner

Join Date:
Apr 2008
Location:
Lancaster, CA
Posts:
58
Plugin Contributions:
0

Re: Categories not listing in admin > catalog > categories section

Your solution worked for me, thanks Ajeh!

13 Aug 2009, 5:38 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Categories not listing in admin > catalog > categories section

Thanks for the update that you were able to use this solution on your admin ... :smile: