Zen Cart Logo
Forums / General Questions / Admin category display slow loading

Admin category display slow loading

Views: 1,089

Results 1 to 20 of 20
3 Jun 2015, 7:51 AM
#1
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Admin category display slow loading

Hi

We have LOT of categories in our database and the Admin page load times are quite often very slow. We have done the obvious things like switching off product counting and talking to our host to check that MySQL servers are running OK.

Are there any ways we can increase the page load speeds when we need to select a category to add a product too?

I assume each category line is built in a function before being displayed but (for instance) we don't need the Model column being picked up and displayed nor the Price/Special/Sale or quantity columns as we never use these.

Thanks in advance

3 Jun 2015, 8:23 AM
#2
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Admin category display slow loading

Yes, I remember having this issue with around 250 categories, from memory and comparing my admin files I think you can do two things

  1. Disable the 'Go To' dropdown box, in includes/modules/category_product_listing.php

line47 change

 if ($_SESSION['display_categories_dropdown'] == 0) {

to

if (false && $_SESSION['display_categories_dropdown'] == 0) {
  1. Disable the check for linked status, the yellow link box will not show,

line 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);

to

if (false && 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);

You should see a marked improvement.

I think it was Ajeh who helped out here.

3 Jun 2015, 8:43 AM
#3
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Admin category display slow loading

you can start by looking in this file : "YOUR_ADMIN\includes\modules\category_product_listing.php"

This is where the listings in the admin are build

3 Jun 2015, 8:57 AM
#4
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

simon1066:

Yes, I remember having this issue with around 250 categories, from memory and comparing my admin files I think you can do two things

  1. Disable the 'Go To' dropdown box, in includes/modules/category_product_listing.php

line47 change

if ($_SESSION['display_categories_dropdown'] == 0) {

> 
> to
> ```
if (false && $_SESSION['display_categories_dropdown'] == 0) {
  1. Disable the check for linked status, the yellow link box will not show,

line 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);

> 
> to
> ```
if (false && 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);

You should see a marked improvement.

I think it was Ajeh who helped out here.

Thank you . I will take a look at that later today :smile:

3 Jun 2015, 8:58 AM
#5
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

Design75:

you can start by looking in this file : "YOUR_ADMIN\includes\modules\category_product_listing.php"

This is where the listings in the admin are build

Thanks - I will take a look at that

3 Jun 2015, 1:29 PM
#6
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

simon1066:

Yes, I remember having this issue with around 250 categories, from memory and comparing my admin files I think you can do two things

  1. Disable the 'Go To' dropdown box, in includes/modules/category_product_listing.php

line47 change

if ($_SESSION['display_categories_dropdown'] == 0) {

> 
> to
> ```
if (false && $_SESSION['display_categories_dropdown'] == 0) {
  1. Disable the check for linked status, the yellow link box will not show,

line 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);

> 
> to
> ```
if (false && 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);

You should see a marked improvement.

I think it was Ajeh who helped out here.

Hi Simon1066

Well I did those changes and there was a slight improvement in performance (probably something to do with the fact that we currently have a total of 2,343 categories/sub-categories!!!!!!)

So i tracked down a bit further and I have completely commented out the code section:

// bof: categories meta tags
if (zen_get_category_metatags_keywords($categories->fields['categories_id'], (int)$_SESSION['languages_id']) or zen_get_category_metatags_description($categories->fields['categories_id'], (int)$_SESSION['languages_id'])) {
echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories->fields['categories_id'] . '&action=edit_category_meta_tags') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit_metatags_on.gif', ICON_METATAGS_ON) . '</a>';
} else {
echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories->fields['categories_id'] . '&action=edit_category_meta_tags') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit_metatags_off.gif', ICON_METATAGS_OFF) . '</a>';
}
// eof: categories meta tags

as we have no need whatsoever for metatags.

The Admin section is now absolutely FLYING!!!!!

Thank you for putting me onto the right track :smile:

3 Jun 2015, 4:05 PM
#7
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Admin category display slow loading

That's good to know about the meta-tags, I might try that too as I don't plan to be editing/adding them any time soon.

3 Jun 2015, 5:27 PM
#8
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

simon1066:

That's good to know about the meta-tags, I might try that too as I don't plan to be editing/adding them any time soon.

I tried adding back in the GOTO drop down and it really slowed up again but I have to say the metatags were killing the page loads!!

Again not only do we have 2343 categories but just under 8500 products so you can see why metatags are a real problem here.

3 Jun 2015, 6:05 PM
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Admin category display slow loading

Seeing that there was minimal improvement in the first round of editing, I might suggest at least restoring the 'Go To' dropdown. Just a suggeston because otherwise you are forced to navigate all the categories manually. Maybe not used often, but can be a time saver.

3 Jun 2015, 6:15 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Admin category display slow loading

NOTE: Next to the Dropdown is either a Checkmark or an X if you click that it enables and disables the Category Drop down ...

3 Jun 2015, 6:19 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: Admin category display slow loading

NOTE: in the Configuration ... My Store ... is the setting to use as the default status:

Show categories Go To dropdown on Categories/Products
Show categories Go To dropdown on Categories/Products?

true
false

3 Jun 2015, 6:47 PM
#12
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

Thanks for the heads up on the Drop down GOTO guys. The metatags checking was definitely a problem thoug - we don't use metatags and searching through 8500 records was a clear problem.

Thanks to everybody who has contributed to this thread. I am nearly finished editing the display to get rid of all the field displays we don't need ... like model, price, quantity and linked products.

You've all been brilliant :)

3 Jun 2015, 7:39 PM
#13
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

Hi Ajeh

Sorry tried it but there is no such setting that I can find in v1.5.1

3 Jun 2015, 7:58 PM
#14
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

Things have slowed a little tonight but I'm guessing it's America coming online into the shared cloud servers ... Will see what it's like early GMT tomorrow.

Or may crappy old Windows because my IMac is amazingly quick lol!!!

3 Jun 2015, 10:10 PM
#15
ajeh avatar

ajeh

Oba-san

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

Re: Admin category display slow loading

In v1.5.1 you will see next to the dropdown for the Categories:

Go To:and to the left of that is a Red X to turn it off or a Green Check to turn it on ...

The the default setting for that is in the Configuration ... My Store ... is unfortunately in v1.5.4 ... but the setting itself still works ... on the Catalog ... Categories/Products ...

4 Jun 2015, 7:37 AM
#16
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

Ajeh:

In v1.5.1 you will see next to the dropdown for the Categories:
and to the left of that is a Red X to turn it off or a Green Check to turn it on ...

The the default setting for that is in the Configuration ... My Store ... is unfortunately in v1.5.4 ... but the setting itself still works ... on the Catalog ... Categories/Products ...

Hi Ajeh

OK so I found the reason that was slowing it down again last night was a Chrome extension (now removed).

Thanks for pointing me in the right direction. To be honest with 61 main categories (Genres), some containing 50 sub-categories (Authors) followed by further sub-categories (Series) using the Go To drop box is extremely time-consuming to navigate so the trade-off of switching it off and navigating via the left-hand folder structure is worth the speed increase.

Again thanks for all your help and advice.

I have considered the shift to v1.5.4 but at the moment I am grimacing at the number of modifications I am going to be faced with!

4 Jun 2015, 9:42 AM
#17
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Admin category display slow loading

DigiBooks:

I have considered the shift to v1.5.4 but at the moment I am grimacing at the number of modifications I am going to be faced with!

Because the upgrade process can be done without interfering with the live store, might I recommend beginning the upgrade sooner, rather than later. At least then when something changes that requires the upgrade, you will be that much better off. Consider it something like an insurance policy or an investment in your business. Otherwise you may end up faced with an out of commision site, in a panic to get the site up, etc... Besides if you've followed ZC best practices it should be relatively easy to do the upgrade and then incorporate the "little" things modified.

4 Jun 2015, 10:51 AM
#18
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

mc12345678:

Because the upgrade process can be done without interfering with the live store, might I recommend beginning the upgrade sooner, rather than later. At least then when something changes that requires the upgrade, you will be that much better off. Consider it something like an insurance policy or an investment in your business. Otherwise you may end up faced with an out of commision site, in a panic to get the site up, etc... Besides if you've followed ZC best practices it should be relatively easy to do the upgrade and then incorporate the "little" things modified.

I take your point .... I would have to load the latest system under a new folder because the "little" things actually aren't that little LOL. We have made a lot of changes particularly in respect of the wording and removing all pricing information as everything onsite is downloaded under subscription. I did a theme change recently which was not fairing well so we copied the site files out - used a test database to manually make our layout changes and then relinked the live database back in.

Am I right in saying that after v1.5.1 there is a change of format of some kind that needs to be applied to the MySQl database?

4 Jun 2015, 11:13 AM
#20
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Admin category display slow loading

mc12345678:

Essentially correct, if you follow the upgrade process all will be addressed. See:http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

It addresses all that you described.

Also see: http://www.zen-cart.com/showthread.php?215694-Known-Bugs-%28and-fixes%29-with-v1-5-4

Hi Thanks - I will do as soon as I finish merging all our group services under one umbrella