Aller au contenu principal

getProductsCountByPageId

Rechercher tous les objets produits avec pagination pour la catégorie sélectionnée.

Description

Cette méthode ... Elle renvoie une Promise qui se résout en un ... objet. Elle renvoie une Promise qui se résout en un IProductsCount.

Produits.getProductsCountByPageId( id, body );

Schéma des paramètres

Schéma

id(obligatoire) : string
ID de la page

body(obligatoire) : any[]
Paramètres du corps pour le filtre. Par défaut : []
exemple :

[
{
"attributeMarker": "price",
"conditionMarker": "in",
"statusMarker": "status_1",
"conditionValue": {},
"pageUrls": [
"23-laminat-floorwood-maxima"
],
"title": "Iphone 17 Pro"
}
]

Exemples

Exemple minimal

  const response = await Produits.getProductsCountByPageId(10);
{
"totalAll": 3,
"totalInCategory": 3,
"totalInCategoryWithNested": 3
}

Schéma de réponse

Schéma : IProductsCount

totalAll : number
Le nombre total de produits trouvés.
exemple : 100

totalInCategory : number
Le nombre total de produits trouvés dans la catégorie.
exemple : 50

totalInCategoryWithNested : number
Le nombre total de produits trouvés dans la catégorie imbriquée.
exemple : 10