如何更改 Spartacus 产品列表页面上分页的默认产品数量?

How do I change the default number of products in pagination on Spartacus product listing page?

Spartacus 产品列表页面上的分页也默认分页 10 个产品。

我希望 PLP 在分页中有 24 个产品。我在 Java 中自定义了 OCC / 搜索服务,我在浏览器中看到网络下的 pageSize = 12,但页面仍然是 10 的分页。

enter image description here

自定义 ProductListComponentService 默认文件时,页面上的 SORT 操作不起作用。

如何更改分页时页面默认显示的产品数量。

有无限滚动这样的结构吗? 看法: { 无限滚动: { 活跃:假, 产品限制:500, 显示更多按钮:假的, }, },

暂无上市配置。为了更改结果数量,我执行了以下操作:

我扩展了 ProductListComponentService 并且我能够覆盖 defaultPageSize 属性 以获得 24 个产品。这样做之后,排序仍然有效。

import { Injectable } from '@angular/core';
import { ProductListComponentService } from '@spartacus/storefront';

@Injectable({ providedIn: 'root' })
export class MyProductListComponentService extends ProductListComponentService {
  defaultPageSize = 24;
}

在我的 app.module.ts:

[...]
providers: [{ provide: ProductListComponentService, useClass: MyProductListComponentService }],