thannes
thannes

Reputation: 778

BigCommerce Stencil - Category Products Per Page

We are seeing an issue beginning yesterday where the Front Matter attribute for products per page defined in our custom layout file is not working.

---
category:
    products:
        limit: 48
---

{{inject "categoryProductsPerPage" 48}}

I have hardcoded the products per page, but somehow only 21 products are being displayed per page. The value 21 is not located anywhere in the config file, or front matter, or backend theme settings. Regardless of where I change this value, it is not reflected in the number of products resources returned. I am only experiencing this issue on one particular store, so I'm not quite sure what to think.

Has anyone else seen this problem in the last few days?

Upvotes: 0

Views: 912

Answers (1)

Kurt Freytag
Kurt Freytag

Reputation: 11

Have you tried adding or editing the categorypage_products_per_page setting in your theme's config.json (at the root of the project)? I was able to change the number of products displayed on a category page without adding any Front Matter to the top of my category page template.

My theme (based off Cornerstone 1.6.4) was explicitly set to 12. Here's how my config.json now reads (major pieces redacted):

{
   ...
   "settings": {
      ...
      "categorypage_products_per_page": 24,
      ...
   }
   ...
}

and that works perfectly.

Upvotes: 1

Related Questions