import { DaffConfigurableProductFacade } from '@daffodil/product-configurable/state'
A facade for interacting with the configurable product state. Exposes many parts of the state for easy access and allows dispatching of actions.
@Injectable()
class DaffConfigurableProductFacade<<T extends DaffConfigurableProduct = DaffConfigurableProduct>> implements DaffConfigurableProductFacadeInterface<T> {
configurableProductSelectors: DaffConfigurableProductAllSelectors<T> = getDaffConfigurableProductAllSelectors<T>()
getAllAttributes(id: T["id"]): any
getAllVariants(id: T["id"]): any
getAppliedAttributes(id: T["id"]): any
getMinimumPrice(id: T["id"]): any
getMaximumPrice(id: T["id"]): any
getMinimumDiscountedPrice(id: T["id"]): any
getMaximumDiscountedPrice(id: T["id"]): any
getMinimumPercentDiscount(id: T["id"]): any
getMaximumPercentDiscount(id: T["id"]): any
isPriceRanged(id: T["id"]): any
hasDiscount(id: T["id"]): any
getSelectableAttributes(id: T["id"]): any
getMatchingVariants(id: T["id"]): any
dispatch(action: Action<string>): void
}
anyAll attributes of a configurable product.
| Parameter | id: T["id"] |
|---|---|
| Description |
anyAll variants of a configurable product.
| Parameter | id: T["id"] |
|---|---|
| Description |
anyThe applied attributes of a configurable product.
| Parameter | id: T["id"] |
|---|---|
| Description |
anyGet the current minimum price possible based on the applied attributes and remaining variants.
| Parameter | id: T["id"] |
|---|---|
| Description |
anyGet the current maximum price possible based on the applied attributes and remaining variants.
| Parameter | id: T["id"] |
|---|---|
| Description |
anyGet the current minimum discounted price possible based on the applied attributes and remaining variants.
| Parameter | id: T["id"] |
|---|---|
| Description |
anyGet the current maximum discounted price possible based on the applied attributes and remaining variants.
| Parameter | id: T["id"] |
|---|---|
| Description |
anyGet the current minimum percent discount possible based on the applied attributes and remaining variants.
| Parameter | id: T["id"] |
|---|---|
| Description |
anyGet the current maximum percent discount possible based on the applied attributes and remaining variants.
| Parameter | id: T["id"] |
|---|---|
| Description |
anyReturns whether the possible price for the configurable product is a range of different prices
| Parameter | id: T["id"] |
|---|---|
| Description |
anyReturns whether the variants of the configurable product have (a) discount(s)
| Parameter | id: T["id"] |
|---|---|
| Description |
anySelectable 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: T["id"] |
|---|---|
| Description |
anyThe variants that match the applied attributes of a configurable product.
| Parameter | id: T["id"] |
|---|---|
| Description |
void| Parameter | action: Action |
|---|---|
| Description |