Methods
-
(static) createFromJson(jsonObject, DefaultModelFactory) → {Product}
-
Parameters:
Name Type Description jsonObjectObject DefaultModelFactoryfactory - Source:
Returns:
- Type
- Product
-
getBrand() → {Facet}
-
- Source:
Returns:
- Type
- Facet
-
getCategory(bool)
-
Returns the first active category and, if non active, then it return the first category
Parameters:
Name Type Description bool$activeOnly return only categories that are active - Source:
Returns:
Category|null -
getCategoryManager() → {DefaultCategoryManager}
-
- Source:
Returns:
- Type
- DefaultCategoryManager
-
getCategoryWithLongestActivePath() → {Category|null}
-
- Source:
Returns:
- Type
- Category | null
-
getDefaultImage() → {ImageModel|null}
-
- Source:
Returns:
- Type
- ImageModel | null
-
getDefaultVariant() → {Variant|null}
-
- Source:
Returns:
- Type
- Variant | null
-
getDescriptionLong() → {string|null}
-
- Source:
Returns:
- Type
- string | null
-
getDescriptionShort() → {string|null}
-
- Source:
Returns:
- Type
- string | null
-
getFacetGroupSet() → {FacetGroupSet|null}
-
- Source:
Returns:
- Type
- FacetGroupSet | null
-
getFacetIds() → {Array.<Object>}
-
This is a low level method. Returns an array of arrays: [ "
" => [ , , ...], " " => [ , ...], ... ] " " are strings with digits are integers for example: [ "0" => [264], "1" => [1234], "206" => [123,234,345] ] - Source:
Returns:
- Type
- Array.<Object>
-
getId() → {number}
-
- Source:
Returns:
- Type
- number
-
getLeafCategories(bool)
-
Returns array of categories without subcategories. E.g. of the product is in the category Damen > Schuhe > Absatzschuhe and Damen > Schuhe > Stiefelleten then [Absatzschuhe, Stiefelleten] will be returned
Parameters:
Name Type Description bool$activeOnly return only categories that are active - Source:
Returns:
Category[] -
getMaxPrice() → {number}
-
- Source:
Returns:
- Type
- number
-
getMinPrice() → {number}
-
- Source:
Returns:
- Type
- number
-
getName() → {string}
-
- Source:
Returns:
- Type
- string
-
getRootCategories(activeOnly) → {Array.<Category>}
-
Parameters:
Name Type Description activeOnlyboolean return only active categories - Source:
Returns:
- Type
- Array.<Category>
-
getStyles() → {Array.<Product>}
-
- Source:
Returns:
- Type
- Array.<Product>
-
getVariantById(variantId) → {Variant}
-
Get variant by id.
Parameters:
Name Type Description variantIdnumber The variant id. - Source:
Returns:
- Type
- Variant
-
getVariantsByEan(ean) → {Array.<Variant>}
-
Parameters:
Name Type Description eanstring - Source:
Returns:
- Type
- Array.<Variant>
-
isActive() → {boolean}
-
- Source:
Returns:
- Type
- boolean