Class: Variant

Variant

new Variant() → {Variant}

Source:
Returns:
Type
Variant

Methods

(static) createFromJson(jsonObject, factory, product) → {Variant}

Parameters:
Name Type Description
jsonObject Object
factory DefaultModelFactory
product Product
Source:
Returns:
Type
Variant

getAboutNumber() → {string}

Source:
Returns:
Type
string

getAdditionalInfo() → {Object|null}

Returns the unstructured additional info
Source:
Returns:
Type
Object | null

getColor() → {FacetGroup|null}

Source:
Returns:
Type
FacetGroup | null

getCreatedDate() → {Date|null}

Source:
Returns:
Type
Date | null

getEan() → {string}

Source:
Returns:
Type
string

getFacetGroup(groupId) → {FacetGroup|null}

Parameters:
Name Type Description
groupId number
Source:
Returns:
Type
FacetGroup | null

getFacetGroupSet() → {FacetGroupSet}

Source:
Returns:
Type
FacetGroupSet

getFacetIds() → {Array.<number>}

Source:
Returns:
Type
Array.<number>

getFirstActiveDate() → {Date|null}

Source:
Returns:
Type
Date | null

getFirstSaleDate() → {Date|null}

Source:
Returns:
Type
Date | null

getId() → {number}

Source:
Returns:
Type
number

getImage() → {ImageModel}

Get selected or default image.
Source:
Returns:
Type
ImageModel

getImageByHash(hash) → {ImageModel}

Get image by given hash.
Parameters:
Name Type Description
hash string The image hash.
Source:
Returns:
Type
ImageModel

getImages() → {Array.<ImageModel>}

Source:
Returns:
Type
Array.<ImageModel>

getLength() → {FacetGroup|null}

Source:
Returns:
Type
FacetGroup | null

getOldPrice() → {number}

Returns the price in euro cent
Source:
Returns:
Type
number

getPrice() → {number}

Returns the price in euro cent
Source:
Returns:
Type
number

getProduct() → {Product}

Source:
Returns:
Type
Product

getQuantity() → {number}

Returns the quantity of still existing units of this variant. Please mind, that this quantity doesn't need to be up to date. You should check via live_variant for the real quantity before adding a product into the cart.
Source:
Returns:
Type
number

getQuantityPerPack() → {number}

Returns the quantity per pack for this variant. By default, this returns 1. But some items can have a bigger number.
Source:
Returns:
quantity per pack
Type
number

getRetailPrice() → {number}

Returns the price in euro cent
Source:
Returns:
Type
number

getSeasonCode() → {FacetGroup|null}

get the season code e.g. "HW 14 / hw14"
Source:
Returns:
Type
FacetGroup | null

getSize() → {FacetGroup|null}

Source:
Returns:
Type
FacetGroup | null

getUpdatedDate() → {Date|null}

Source:
Returns:
Type
Date | null

isDefault() → {boolean}

Source:
Returns:
Type
boolean

selectImage(hash) → {null}

Select a specific image.
Parameters:
Name Type Description
hash string The image hash or null for default image.
Source:
Returns:
Type
null