import { DaffConfigurableProductFacadeInterface } from '@daffodil/product-configurable/state'
An interface for a facade that accesses configurable product state. Exposes many parts of the state for easy access and allows dispatching of actions.
interface DaffConfigurableProductFacadeInterface {
getAllAttributes(id: string): Observable<Dictionary<string[]>>
getAllVariants(id: string): Observable<DaffConfigurableProductVariant[]>
getAppliedAttributes(id: string): Observable<Dictionary<string>>
getMinimumPrice(id: string): Observable<number>
getMaximumPrice(id: string): Observable<number>
getMinimumDiscountedPrice(id: string): Observable<number>
getMaximumDiscountedPrice(id: string): Observable<number>
getMinimumPercentDiscount(id: string): Observable<number>
getMaximumPercentDiscount(id: string): Observable<number>
isPriceRanged(id: string): Observable<boolean>
hasDiscount(id: string): Observable<boolean>
getSelectableAttributes(id: string): Observable<Dictionary<string[]>>
getMatchingVariants(id: string): Observable<DaffConfigurableProductVariant[]>
}
Observable<Dictionary<string[]>>
All attributes of a configurable product.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<DaffConfigurableProductVariant[]>
All variants of a configurable product.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<Dictionary<string>>
The applied attributes of a configurable product.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<number>
Get the current minimum price possible based on the applied attributes and remaining variants.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<number>
Get the current maximum price possible based on the applied attributes and remaining variants.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<number>
Get the current minimum discounted price possible based on the applied attributes and remaining variants.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<number>
Get the current maximum discounted price possible based on the applied attributes and remaining variants.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<number>
Get the current minimum percent discount possible based on the applied attributes and remaining variants.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<number>
Get the current maximum percent discount possible based on the applied attributes and remaining variants.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<boolean>
Returns whether the possible price for the configurable product is a range of different prices
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<boolean>
Returns whether the variants of the configurable product have (a) discount(s)
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<Dictionary<string[]>>
Selectable configurable product attributes derived from the remaining variants and the order of currently applied attributes. The remaining variants of the product are derived from the currently applied attributes.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |
Observable<DaffConfigurableProductVariant[]>
The variants that match the applied attributes of a configurable product.
Parameter | id: string |
---|---|
Description | the id of the configurable product. |