Pagination in Zen Cart

How do you display a large number of results?

When a listing page is created, the results are shown in paginated blocks, with navigation between blocks of results. For example, here’s the Specials page on a mobile device.

Specials pagination



In this screenshot, there are 27 specials, which are displayed in groups of 9. The navigation controls (Next and Previous links) may be shown at the top, bottom or both places.

The desktop display is similar, but because a desktop screen is wider, more products per row can be shown.

Specials pagination - desktop



Pagination controls are provided in the Zen Cart admin on the page Admin > Configuration > Maximum Values:

Page Name Control
Specials Products on Special
New Products New Products Listing- Number Per Page
Featured Products Maximum Display of Featured Products Page
Advanced Search Results Products Listing- Number Per Page
Index Listing Products Listing- Number Per Page
All Products Maximum Display of Products All Page



The behavior and appearance of the Next and Previous navigation links is controlled using settings on the Admin > Configuration > Product Info page.

And since these are template elements, they can be styled. For example, here’s another template’s interpretation of the navigation:

Navigation




Still have questions? No problem! Just head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified August 27, 2020 by Scott C Wilson (e4a8002).