Ana içeriğe geç

getProductsEmptyPage

Kategorisi olmayan tüm ürün nesnelerini sayfalama ile arayın.

Açıklama

Bu yöntem, sağlanan sorgu parametrelerine (userQuery) dayanarak kategorisi olmayan ürün sayfası nesnelerini sayfalama ile arar. Bir Promise döner ve bu Promise, IProductsResponse nesnesi ile çözülür.

Products.getProductsEmptyPage( langCode, userQuery );

Parametreler şeması

Şema

body: object
İstek gövdesi. Varsayılan:
örnek:

langCode: string
Dil kodu. Varsayılan: "en_US"
örnek: "en_US"

userQuery: IProductsQuery
İsteğe bağlı sorgu parametreleri
örnek:

{
"limit": 30,
"offset": 0,
"sortOrder": "DESC",
"sortKey": "id",
"signPrice": "orders",
"templateMarker": "template_12345",
"statusMarker": "in_stock",
"conditionValue": "new",
"conditionMarker": "eq",
"attributeMarker": "color"
}

userQuery.offset(required): number
Sayfalama için parametre. Varsayılan: 0.

userQuery.limit(required): number
Sayfalama için parametre. Varsayılan: 30.

userQuery.sortOrder(required): string
Sıralama düzeni "DESC" | "ASC". Varsayılan: "DESC".

userQuery.sortKey(required): string
Sıralama için alan (varsayılan - null). Olası değerler: "id", "position", "title", "date", "price". Varsayılan: null.

userQuery.signPrice: string
Fiyat işareti. Varsayılan: null.

userQuery.templateMarker: string | null
Ürün sayfası şablon işareti, varsayılan null.
örnek: "template_12345"

userQuery.statusMarker: string | null
Ürün sayfası durum işareti, varsayılan null.
örnek: "in_stock"

userQuery.conditionValue: string | null
Aranan değer, varsayılan null.
örnek: "new"

userQuery.attributeMarker: string | null
Değerlerin filtrelendiği dizinlenmiş niteliğin metin tanımlayıcısı, varsayılan null.
örnek: "color"

userQuery.conditionMarker: string | null
Değerlerin filtrelendiği filtre koşulunun işareti, varsayılan null.
örnek: "equals"

userQuery.langCode: string
Dil kodu. Varsayılan: "en_US".

userQuery.ids: string
Virgülle ayrılmış ürün id'leri listesi — getProductsByIds tarafından kullanılır.
örnek: "1,2,3"

Varsayılan olarak, 10 nesne alabilirsiniz. Bu, modülün izin ayarlarında kayıt limitinden kaynaklanmaktadır.
Sayfalamanın doğru çalışması için, ilgili bölümde ihtiyaçlarınıza göre Modül izinlerini yapılandırmanız gerekir.

Örnekler

Minimal örnek

const response = await Products.getProductsEmptyPage();

Nitelikler ile örnek

const userQuery = {
"offset": 0,
"limit": 30,
"sortOrder": "DESC",
"sortKey": "id"
};

const response = await Products.getProductsEmptyPage('en_US', userQuery);
Belirli ürünleri bulmak için filtreleri kullanın:

attributeMarker: Değerlerin filtrelendiği dizinlenmiş niteliğin metin tanımlayıcısı. conditionMarker: Nitelik değerine uygulanacak koşul türü.

İşaretAnlamıÖrnek
eqEşitstatusId = 1 (sadece aktif)
neqEşit değilrole ≠ "Viewer"
inİçerir (birinden)role in ["Editor", "Manager"]
ninİçermezemail not in ["@temp.com"]
exsVardır (değeri var)Has lastLogin
nexsYokturHiç giriş yapmadı

conditionValue: Karşılaştırılacak değer.

Örnek yanıt

{
"total": 15,
"items": [
{
"localizeInfos": {
"title": "Товар"
},
"paymentStages": [
{
"title": "Part A",
"marker": "part_a",
"value": 100
},
{
"title": "Part B",
"marker": "part_b",
"value": 200
}
],
"id": 1764,
"isVisible": true,
"isSync": true,
"price": 0,
"additional": {
"prices": {
"min": 0,
"max": 100
}
},
"blocks": [],
"sku": "0-123",
"productPages": [
{
"id": 8997,
"pageId": 1176,
"productId": 8872
}
],
"rating": {
"votes": 42,
"value": 4.5,
"like": 10,
"dislike": 2,
"method": "weighted"
},
"statusLocalizeInfos": {
"title": "Товар"
},
"templateIdentifier": "my-template",
"shortDescTemplateIdentifier": "my-template-short",
"attributeValues": {
"marker": {
"value": "",
"type": "string",
"position": 1,
"isProductPreview": false,
"isIcon": false,
"additionalFields": {
"marker": {
"type": "string",
"value": "test"
}
}
}
},
"attributeSetIdentifier": "my-set",
"statusIdentifier": "my-status",
"position": 1,
"signedPrice": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"formModuleConfigs": [
{
"id": 1,
"formIdentifier": "reg",
"moduleIdentifier": "user",
"entityIdentifiers": [],
"isGlobal": true,
"isClosed": false,
"viewOnlyMyData": false,
"commentOnlyMyData": false,
"formDataCount": 0,
"entityFormDataCount": {},
"exceptionIds": [
"shop"
],
"nestedEntityIdentifiers": [
"avto-aksessuary",
"fm-moduliatory",
"avtomobilnye-derzhateli",
"videoregistratory-radiolokatory"
],
"ratingCalculation": "average",
"allowHalfRatings": true,
"maxRatingScale": 5,
"isAnonymous": true,
"allowRerating": true,
"isRating": true
}
],
"discountConfig": {
"discounts": [
{
"id": 5,
"identifier": "summer-sale",
"type": "DISCOUNT",
"localizeInfos": {
"title": "Summer Sale"
},
"startDate": "2026-01-01T06:32:19.736Z",
"endDate": "2026-01-28T06:32:22.632Z",
"discountValue": {
"value": 30,
"maxAmount": 0,
"discountType": "FIXED_PRICE",
"applicability": "TO_PRODUCT"
},
"exclusions": [
{
"id": 2
}
],
"position": 3,
"conditionLogic": "OR",
"gifts": [
{
"id": 3,
"localizeInfos": {
"title": "hhh222"
},
"attributeSetIdentifier": "attr-set-1",
"statusIdentifier": null,
"statusLocalizeInfos": {},
"templateIdentifier": null,
"price": 90,
"sku": null,
"attributeValues": {
"price1": {
"type": "integer",
"value": "90",
"isIcon": false,
"position": 0,
"additionalFields": [],
"isProductPreview": false
}
},
"isVisible": true
}
],
"conditions": [
{
"conditionType": "PRODUCT",
"entityIds": [
{
"id": 4,
"isNested": false
},
{
"isNested": false
}
],
"value": null
},
{
"conditionType": "ATTRIBUTE",
"entityIds": [
{
"isNested": false
}
],
"value": {
"value": "100",
"condition": "eq"
}
}
]
}
],
"discountPrice": 90,
"settings": {
"allowStacking": true,
"maxDiscountValue": 30,
"allowGiftStacking": false
}
}
},
{
"localizeInfos": {
"title": "Товар"
},
"paymentStages": [
{
"title": "Part A",
"marker": "part_a",
"value": 100
},
{
"title": "Part B",
"marker": "part_b",
"value": 200
}
],
"id": 1764,
"isVisible": true,
"isSync": true,
"price": 0,
"additional": {
"prices": {
"min": 0,
"max": 100
}
},
"blocks": [],
"sku": "0-123",
"productPages": [
{
"id": 8997,
"pageId": 1176,
"productId": 8872
}
],
"rating": {
"votes": 42,
"value": 4.5,
"like": 10,
"dislike": 2,
"method": "weighted"
},
"statusLocalizeInfos": {
"title": "Товар"
},
"templateIdentifier": "my-template",
"shortDescTemplateIdentifier": "my-template-short",
"attributeValues": {
"marker": {
"value": "",
"type": "string",
"position": 1,
"isProductPreview": false,
"isIcon": false,
"additionalFields": {
"marker": {
"type": "string",
"value": "test"
}
}
}
},
"attributeSetIdentifier": "my-set",
"statusIdentifier": "my-status",
"position": 1,
"signedPrice": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"formModuleConfigs": [
{
"id": 1,
"formIdentifier": "reg",
"moduleIdentifier": "user",
"entityIdentifiers": [],
"isGlobal": true,
"isClosed": false,
"viewOnlyMyData": false,
"commentOnlyMyData": false,
"formDataCount": 0,
"entityFormDataCount": {},
"exceptionIds": [
"shop"
],
"nestedEntityIdentifiers": [
"avto-aksessuary",
"fm-moduliatory",
"avtomobilnye-derzhateli",
"videoregistratory-radiolokatory"
],
"ratingCalculation": "average",
"allowHalfRatings": true,
"maxRatingScale": 5,
"isAnonymous": true,
"allowRerating": true,
"isRating": true
}
],
"discountConfig": {
"discounts": [
{
"id": 5,
"identifier": "summer-sale",
"type": "DISCOUNT",
"localizeInfos": {
"title": "Summer Sale"
},
"startDate": "2026-01-01T06:32:19.736Z",
"endDate": "2026-01-28T06:32:22.632Z",
"discountValue": {
"value": 30,
"maxAmount": 0,
"discountType": "FIXED_PRICE",
"applicability": "TO_PRODUCT"
},
"exclusions": [
{
"id": 2
}
],
"position": 3,
"conditionLogic": "OR",
"gifts": [
{
"id": 3,
"localizeInfos": {
"title": "hhh222"
},
"attributeSetIdentifier": "attr-set-1",
"statusIdentifier": null,
"statusLocalizeInfos": {},
"templateIdentifier": null,
"price": 90,
"sku": null,
"attributeValues": {
"price1": {
"type": "integer",
"value": "90",
"isIcon": false,
"position": 0,
"additionalFields": [],
"isProductPreview": false
}
},
"isVisible": true
}
],
"conditions": [
{
"conditionType": "PRODUCT",
"entityIds": [
{
"id": 4,
"isNested": false
},
{
"isNested": false
}
],
"value": null
},
{
"conditionType": "ATTRIBUTE",
"entityIds": [
{
"isNested": false
}
],
"value": {
"value": "100",
"condition": "eq"
}
}
]
}
],
"discountPrice": 90,
"settings": {
"allowStacking": true,
"maxDiscountValue": 30,
"allowGiftStacking": false
}
}
}
]
}

Yanıt şeması

Şema: IProductsResponse

attrValue: string
Nitelik değeri.

items: IProductsEntity[]
Ürün varlıkları dizisi.

items.id: number
Benzersiz tanımlayıcı.
örnek: 12345

items.localizeInfos: ILocalizeInfo
Ürünlerin adları, yerelleştirme dikkate alınarak.
örnek:

items.statusIdentifier: string | null
Ürün sayfası durum tanımlayıcıları (null olabilir).
örnek: "in_stock"

items.statusLocalizeInfos: ILocalizeInfo
Ürün için yerelleştirilmiş durum adı.
örnek: { "title": "İndirim" }

items.attributeSetIdentifier: string | null
Nitelik seti id'si.
örnek: "set_12345"

items.position: number
Öğe numarası (sıralama için).
örnek: 1

items.price: number | null
İndeksten alınan ürün sayfası fiyat değeri.
örnek: 150.00

items.additional: object
İndeksten alınan ek değer.
örnek: { prices: { min: 5 max: 150 } }

items.sku: string | null
Ürün SKU'su (Stok Tutma Birimi), null olabilir.
örnek: "SKU_12345"

items.isSync: boolean
Sayfa indeksleme durumu.
örnek: true

items.attributeValues: AttributeType
İndeksten temsil edilen nitelik değerleri dizisi.
örnek:

[
{
"id": "color",
"value": "red"
}
]

items.categories: string[]
Ürün kategorileri.
örnek:

[
1,
2,
3
]

items.isVisible: boolean
Sayfa görünürlük durumu.
örnek: true

items.moduleFormConfigs: Array<IFormConfig>
Modül form yapılandırmaları (isteğe bağlı).

items.rating: IRating
Değerlendirme verileri.

items.isPositionLocked: boolean
Sıralama pozisyonu kilit göstergesi (isteğe bağlı).
örnek: false

items.relatedIds: number[]
İlgili ürün sayfalarının id'leri.
örnek:

[
12345,
67890
]

items.paymentStages: unknown
Ödeme aşamaları verileri (null olabilir).
örnek: null

items.discountConfig: Record<string, unknown>
İndirim yapılandırma nesnesi.
örnek:

items.templateIdentifier: string | null
Bağlı şablonun kullanıcı id'si.
örnek: "template_12345"

items.shortDescTemplateIdentifier: string | null
Kısa açıklama için bağlı şablonun kullanıcı id'si.
örnek: "short_desc_template_12345"

items.signedPrice: string
Fiyat işareti.

items.productPages: IProductPageRef[]
Ürünü sayfalarına bağlayan ürün sayfası referansları dizisi.
örnek:

[
{
"id": 16,
"pageId": 4,
"productId": 15,
"positionId": 244,
"categoryPath": "products"
}
]

productPages.id: number
Ürün-sayfa bağlantı kaydının benzersiz tanımlayıcısı.
örnek: 16

productPages.pageId: number
Ürünün bağlı olduğu sayfanın tanımlayıcısı.
örnek: 4

productPages.productId: number
Ürün tanımlayıcısı.
örnek: 15

productPages.positionId: number
Sayfa içindeki sıralama pozisyonu tanımlayıcısı.
örnek: 244

productPages.categoryPath: string
Ürünün ait olduğu sayfanın kategori yolu.
örnek: "products"

items.blocks: string[]
Blok tanımlayıcıları dizisi.
örnek:

[
"block_12345",
"block_67890"
]

productIds: string[]
Ürün id'leri dizisi.

total: number
Toplam sayı.