Ana içeriğe geç

getProductsCountByPageUrl

Seçilen kategori için (URL'si ile) sayfalama ile tüm ürün nesnelerini arayın.

Açıklama

Bu yöntem ... Bir IProductsCount döndüren bir Promise döner.

Products.getProductsCountByPageUrl( url, body );

Parametreler şeması

Şema

url(zorunlu): string
Sayfa url'si

body(zorunlu): any[]
Filtre için gövde parametreleri. Varsayılan: []
örnek:

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

Örnekler

Minimal örnek

  const response = await Products.getProductsCountByPageUrl('catalog');

Örnek yanıt

{
"totalAll": 3,
"totalInCategory": 3,
"totalInCategoryWithNested": 3
}

Yanıt şeması

Şema: IProductsCount

totalAll: number
Bulunan toplam ürün sayısı.
örnek: 100

totalInCategory: number
Kategoride bulunan toplam ürün sayısı.
örnek: 50

totalInCategoryWithNested: number
İç içe kategoride bulunan toplam ürün sayısı.
örnek: 10