Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Limiting Categories displayed

Limiting Categories displayed

Locked

Views: 2,714

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
26 Mar 2007, 4:14 AM
#1
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Limiting Categories displayed

Is there a way to limit the number of categories rows displayed per page? I can't seem to find this setting anywhere, and there are too many categories which makes the page load quite slow.

26 Mar 2007, 5:08 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Limiting Categories displayed

and there are too many categories which makes the page load quite slow.
The text listings of categories does not cause slow page loading - look at your image file sizes and the # of images loading on a page

26 Mar 2007, 5:15 AM
#3
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Re: Limiting Categories displayed

Hi Kobra,

Does this mean that there is no way to restrict the number showing? The images aren't huge in size, but because there are so many this is why it slows it down. These images are actually linked to the actual product images as well, so resizing the images just for the categories pages would mean duplicating images on the server which I would rather avoid if possible.

26 Mar 2007, 5:18 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Limiting Categories displayed

Post a url to this so we can view what it is that you are seeing

26 Mar 2007, 5:41 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Limiting Categories displayed

To limit the product listings:

Admin > config > maximum values > Products Listing- Number Per Page > set to a value like "10"

Your images for this are relatively small in dimensions like 80x100 or so but the file size for these range from 5k to 15k - where only about 2-3k is required for a small image like this.

There is a 3 image system that is native to Zen Cart to mitigate this and still have larger images with the necessary detail. Or there is a mod - image handler - that will assist in using a single image.

After all this - even your home page loads slow - I would suspect that you are on an overloaded server and you may be able to request being relocated to another less loaded server or look at alternative hosting.

26 Mar 2007, 5:53 AM
#8
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Re: Limiting Categories displayed

kobra:

Admin > config > maximum values > Products Listing- Number Per Page > set to a value like "10"

This is already set to 10. I had fiddled around with this before I posted this, and thought it must have been for something else as it made no changes to the page.

kobra:

Your images for this are relatively small in dimensions like 80x100 or so but the file size for these range from 5k to 15k - where only about 2-3k is required for a small image like this.

These images are actually also displayed when you click on that category, so the larger sizing is needed there. Otherwise I have two seperate images which both show the same perfume. So actual size of the dimensions needs to be larger.

kobra:

After all this - even your home page loads slow - I would suspect that you are on an overloaded server and you may be able to request being relocated to another less loaded server or look at alternative hosting.

The loading time of the home page is fine, it is only this page that is effected.

Thanks :)

26 Mar 2007, 5:55 AM
#9
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Re: Limiting Categories displayed

misty:

http://www.zen-cart.com/forum/showthread.php?t=38307
Post above may help

Thanks Misty, but this is actually a different problem to mine.

26 Mar 2007, 8:43 AM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Limiting Categories displayed

This is already set to 10. I had fiddled around with this before I posted this, and thought it must have been for something else as it made no changes to the page.
I just adjusted this on a stock Zen Cart install to 5 and it limited the display to 5.
I would suggest that you look at what you might have changed to not allow this function to work.
These images are actually also displayed when you click on that category, so the larger sizing is needed there. Otherwise I have two seperate images which both show the same perfume. So actual size of the dimensions needs to be larger.
The default method calls for three images of the same item but in 3 sizes - and I referenced the Image Handler module that you can also use to mediate one image.
The loading time of the home page is fine, it is only this page that is effected.
If this is OK for you the so be-it...I would not stay on a site that loads this slow.

26 Mar 2007, 8:58 AM
#11
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Re: Limiting Categories displayed

kobra:

I just adjusted this on a stock Zen Cart install to 5 and it limited the display to 5.
I would suggest that you look at what you might have changed to not allow this function to work.

Any ideas what files would control this? I have made adjustments to so many different files I wouldn't know where to begin to trackback.

Sorry I misunderstood you on points 2 and 3. I cleared my cache and you are right, the home was was slow to load.

26 Mar 2007, 9:03 AM
#12
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Limiting Categories displayed

If you are using the override system you can try first changing to the classic template. If you overlooked doing this and have not kept a log of your edits - You will have to determine the install date and most of the files will have this date.

Then make a list of the changed files (later date)...

It appears that you installed the column-grid module and you can begin there especially of you edited these files

26 Mar 2007, 11:07 AM
#13
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Re: Limiting Categories displayed

Thanks Kobra, will do.

4 Apr 2007, 8:42 AM
#14
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Re: Limiting Categories displayed

kobra:

If you are using the override system you can try first changing to the classic template. If you overlooked doing this and have not kept a log of your edits - You will have to determine the install date and most of the files will have this date.

It appears that you installed the column-grid module and you can begin there especially of you edited these files

I have been working back through this trying to find the cause, and couldn't, so I ran a fresh install of ZenCart without any customisations except for installing the columns module, and linked it to the old database. The same problem is there. In fact, when you try to change the formatting back to 'rows', it still stays as columns, even though when I check the sql database, it shows ROWS, but is not making the change.

The fact that the cart is a fresh install and the database is still the old one, makes me think the problem lies with the database. I have a test cart with test store front (version 1.3.7) installed and tested this mod, and it worked fine.

Any ideas?

4 Apr 2007, 11:13 AM
#15
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Limiting Categories displayed

First do a complete DB backup in the event this really breaks things.

On your demo install, export the configuration & any tables that are for the column-grid mod to a file.

Select the old DB and import this small backup & see if this corrects the issue.

Make sure using phpmyadmin to check these options:
add drop table, add if not exists, Complete inserts, Extended inserts.

5 Apr 2007, 6:26 AM
#16
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Re: Limiting Categories displayed

Thanks Kobra. Tried that, and it didn't work either. What I have ended up doing is starting the cart from scratch and testing different things one by one to see where the problem kicked in. I found out that:

  • While it changes the categories to columns, it doesn't limit the number of categories showing

  • it only limits the number of actual products showing when you are in product display.

Originally Posted by kobra  

Admin > config > maximum values > Products Listing- Number Per Page > set to a value like "10" 

Is my problem occuring because I am trying to limit categories rather than products with the column layout grid mod?

5 Apr 2007, 6:38 AM
#17
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Re: Limiting Categories displayed

just as an additional note to that, i do realsie that option was to list products, but the only other option i cans ee for limiting categories is

Admin > config > maximum values > Maximum Categories Products Display List which is limited to 5 and not limiting what I view.

9 Apr 2007, 12:32 PM
#18
quantum avatar

quantum

Zen Follower

Join Date:
May 2005
Posts:
134
Plugin Contributions:
0

Re: Limiting Categories displayed

kobra:

To limit the product listings:
After all this - even your home page loads slow - I would suspect that you are on an overloaded server and you may be able to request being relocated to another less loaded server or look at alternative hosting.

I just thought I would make mention (in case anyone else has the same problem) that the reason the site was actually loading so slowly was due to the dhtml menu I was using. I got rid of that and have put a css/js menu system in now and the pages load fine. Not sure why the dhtml menu was causing that problem, but there you go....