offer.where
Oferuje pozycje katalogu spełniające Twoje warunki.
Sygnatura
offer.where(where: ContentWhere, opts?: { maxItems?: number; flag?: { by: string; map: Record<string, string> } }): ContentOfferParametry
| Nazwa | Typ | Wymagane | Opis |
|---|---|---|---|
where | ContentWhere | Wymagane | Warunki pól, które musi spełnić pozycja. |
opts | { maxItems?: number; flag?: { by: string; map: Record<string, string> } } | Opcjonalne | Dodatkowe ustawienia, np. maxItems określające maksimum oferowanych pozycji. |
Zwraca
ContentOffer Oferta do przekazania do list.add lub list.addRow.
Przykład
list.add(self, "pack", trinket, offer.where({ weight: { lte: 3 } }));
