Skip to main content

getProductsCountByPageUrl

Search for all product objects with pagination for the selected category (by its URL).

Description

This method ... It returns a Promise that resolves to an IProductsCount..

Products.getProductsCountByPageUrl( url, body );

Parameters schema

Schema

url(required): string
Page url

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.getProductsCountByPageUrl('catalog');

Example response

{
"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