Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,303
    Plugin Contributions
    1

    Default 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
    Code:
     if ($_SESSION['display_categories_dropdown'] == 0) {
    to
    Code:
    if (false && $_SESSION['display_categories_dropdown'] == 0) {
    2. Disable the check for linked status, the yellow link box will not show,

    line 167 change
    Code:
     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
    Code:
    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. #3
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default 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

  4. #4
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Admin category display slow loading

    Quote Originally Posted by simon1066 View Post
    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
    Code:
     if ($_SESSION['display_categories_dropdown'] == 0) {
    to
    Code:
    if (false && $_SESSION['display_categories_dropdown'] == 0) {
    2. Disable the check for linked status, the yellow link box will not show,

    line 167 change
    Code:
     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
    Code:
    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

  5. #5
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Admin category display slow loading

    Quote Originally Posted by Design75 View Post
    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

  6. #6
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Admin category display slow loading

    Quote Originally Posted by simon1066 View Post
    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
    Code:
     if ($_SESSION['display_categories_dropdown'] == 0) {
    to
    Code:
    if (false && $_SESSION['display_categories_dropdown'] == 0) {
    2. Disable the check for linked status, the yellow link box will not show,

    line 167 change
    Code:
     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
    Code:
    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

  7. #7
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,303
    Plugin Contributions
    1

    Default 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.

  8. #8
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Admin category display slow loading

    Quote Originally Posted by simon1066 View Post
    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.

  9. #9
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default 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.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Slow Loading times on site and in Admin
    By Goetch in forum General Questions
    Replies: 8
    Last Post: 2 Apr 2013, 12:06 PM
  2. Slow loading in admin/categories
    By whiteracing in forum General Questions
    Replies: 1
    Last Post: 9 Jan 2012, 07:12 PM
  3. Admin Categories Display Performance VERY Slow
    By philmorew in forum Basic Configuration
    Replies: 2
    Last Post: 8 Sep 2009, 09:26 PM
  4. admin slow loading
    By McGill in forum General Questions
    Replies: 1
    Last Post: 13 Jun 2008, 01:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg