Regole di visualizzazione per categoria — Documentation
Category Listing Rules gives you per-category control over how a category page lists its products — the number of products per page and the default sort order — with inheritance down the category tree, store-wide defaults, and a hard cap. It changes only how products are listed; it never modifies products, categories, prices or stock, and adds no columns to PrestaShop's own tables.
Installation
- Upload and install the module from Modules → Module Manager (or your one-click account download).
- Open Configure → Category Listing Rules → Rules in the back office.
- No storefront theme edits are required — the module works through PrestaShop's product-search query on category listing pages.
Requires PrestaShop 1.7.8 or newer (including 8.x and 9.x) and PHP 7.1+.
Creating a rule
Open Rules → Add new and set:
- Category — pick the category this rule applies to (type-ahead category picker).
- Include child categories — when on, the rule also covers every subcategory of the chosen category, unless a subcategory has its own rule.
- Products per page — how many products the category lists per page. Leave empty to keep the theme default.
- Show all products on one page — lists the whole category on a single page (best for small or curated categories). When on, "products per page" is ignored.
- Default sort order — position, name A–Z / Z–A, price low→high / high→low, newest, or highest stock first.
- Priority — breaks ties when more than one active rule could apply to the same category (higher wins).
- Active — enable or disable the rule without deleting it.
How a rule is chosen
For each category page the module resolves exactly one rule, in this order:
- Exact match — a rule on the category itself always wins.
- Nearest inheriting parent — otherwise the closest parent category whose rule has Include child categories enabled.
- Priority — if several candidates remain, the highest priority wins; ties fall back to the oldest rule.
A category with no matching rule keeps your theme default.
Store-wide defaults and the maximum cap
Under Settings → Configuration you can set:
- Default products per page and Default sort order — applied to any category that has no specific rule.
- Maximum products per page — a hard cap applied to every listing, including rules set to "show all". Use 0 for no cap. This protects your layout and server from oversized listings.
The shopper is always in control
A rule only sets the default. As soon as a visitor chooses their own sort order or page size from your theme's controls, that choice is respected for the request and the rule steps aside — no flicker, no fighting the URL.
Multishop
Rules are stored per shop, so each store in a multishop installation keeps its own listing rules. A rule created in one shop does not affect the others.
Uninstalling
Your rules are kept in the module's own tables on uninstall for data safety, so reinstalling restores your configuration. Removing the tables is a separate, deliberate action.
Troubleshooting
- A sort option shows nothing / empty category — the "best sellers" sort depends on a search provider that supplies sales data (e.g. faceted search); this module ships the sort options that work on the native category listing.
- My rule doesn't apply — confirm the rule is Active, scoped to the current shop, and that the shopper hasn't chosen their own sort/page size in the URL. Check the Integrity tab to verify the module's tables and hook are healthy.
- Nothing changes on 1.7.6 or older — the product-search query hook this module uses exists from PrestaShop 1.7.8 onward.