getProductsCountByPageId
Search all product objects with pagination for selected category.
Description
This method ... It returns a Promise that resolves to an ... object. It returns a Promise that resolves to an IProductsCount.
Products.getProductsCountByPageId(
id,
body
);
Parameters schema
Schema
id(required): string
Page ID
body(required): any[]
Body parameters for filter. Deault: []
example:
[
{
"attributeMarker": "price",
"conditionMarker": "in",
"statusMarker": "status_1",
"conditionValue": {},
"pageUrls": [
"23-laminat-floorwood-maxima"
],
"title": "Iphone 17 Pro"
}
]
Examples
Minimal example
const response = await Products.getProductsCountByPageId(10);
{
"totalAll": 3,
"totalInCategory": 3,
"totalInCategoryWithNested": 3
}
Response schema
Schema: IProductsCount
totalAll: number
The total number of products found.
example: 100
totalInCategory: number
The total number of products found in category.
example: 50
totalInCategoryWithNested: number
The total number of products found in nested category.
example: 10