getProductsCountByPageUrl
Recherchez tous les objets produits avec pagination pour la catégorie sélectionnée (par son URL).
Description
Cette méthode ... Elle renvoie une promesse qui se résout en un IProductsCount..
Produits.getProductsCountByPageUrl(
url,
body
);
Schéma des paramètres
Schéma
url(obligatoire) : string
URL 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 Products.getProductsCountByPageUrl('catalog');
Exemple de réponse
{
"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