getProductsCount
Search all product objects with pagination and filter.
Description
This method ... It returns a Promise that resolves to an IProductsCount.
Products.getProductsCount(
body
);
Parameters schema
Schema
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.getProductsCount();
Example response
{
"totalAll": 3,
"totalInCategory": 0,
"totalInCategoryWithNested": 0
}
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