@plentymarkets/shop-api / itemSearchAutocompleteGetters
Variable: itemSearchAutocompleteGetters ​
constitemSearchAutocompleteGetters:object
Defined in: getters/itemSearchAutocompleteGetters.ts:62
Type Declaration ​
getCrossedPrice ​
getCrossedPrice: (
item) =>number|null
Returns the crossed-out (RRP) unit price value of an autocomplete search result item.
Parameters ​
item ​
The autocomplete item.
Returns ​
number | null
The crossed price value as a number, or null if not set.
getCrossedPriceFormatted ​
getCrossedPriceFormatted: (
item) =>string
Returns the formatted crossed-out (RRP) unit price string of an autocomplete search result item.
Parameters ​
item ​
The autocomplete item.
Returns ​
string
The formatted crossed price string, or an empty string if not set.
getPrice ​
getPrice: (
item) =>number
Returns the unit price value of an autocomplete search result item.
Parameters ​
item ​
The autocomplete item.
Returns ​
number
The unit price as a number, or 0 if not set.
getPriceFormatted ​
getPriceFormatted: (
item) =>string
Returns the formatted unit price string of an autocomplete search result item.
Parameters ​
item ​
The autocomplete item.
Returns ​
string
The formatted price string (e.g. "9,99 €"), or an empty string if not set.
hasDifferentPrices ​
hasDifferentPrices: (
item) =>boolean
Returns whether the regular price and the crossed-out price are different for the autocomplete item. Returns false if either price is not set.
Parameters ​
item ​
The autocomplete item.
Returns ​
boolean
true if the prices differ (compared with two-decimal precision), otherwise false.