GitHub

DaffConfigurableProductMemoizedSelectors

Type

import { DaffConfigurableProductMemoizedSelectors } from '@daffodil/product-configurable/state'

An interface describing all selectors unique to configurable products including ranged pricing, configurable attributes, and product variants.

interface DaffConfigurableProductMemoizedSelectors<T extends DaffConfigurableProduct = DaffConfigurableProduct> {
  selectAllConfigurableProductAttributes: (productId: T["id"]) => any
  selectAllConfigurableProductVariants: (productId: T["id"]) => any
  selectMatchingConfigurableProductVariants: (productId: T["id"]) => any
  selectConfigurableProductPrices: (productId: T["id"]) => any
  selectConfigurableProductDiscountedPrices: (productId: T["id"]) => any
  selectConfigurableProductPercentDiscounts: (productId: T["id"]) => any
  selectConfigurableProductHasDiscount: (productId: T["id"]) => any
  selectConfigurableProductMinimumPrice: (productId: T["id"]) => any
  selectConfigurableProductMaximumPrice: (productId: T["id"]) => any
  selectConfigurableProductMinimumDiscountedPrice: (productId: T["id"]) => any
  selectConfigurableProductMaximumDiscountedPrice: (productId: T["id"]) => any
  selectConfigurableProductMinimumPercentDiscount: (productId: T["id"]) => any
  selectConfigurableProductMaximumPercentDiscount: (productId: T["id"]) => any
  isConfigurablePriceRanged: (productId: T["id"]) => any
  selectSelectableConfigurableProductAttributes: (productId: T["id"]) => any
}

Properties

selectAllConfigurableProductAttributes
(productId: T["id"]) => any

Selects all possible attributes of a configurable product.

selectAllConfigurableProductVariants
(productId: T["id"]) => any

Selects all variants of the configurable product.

selectMatchingConfigurableProductVariants
(productId: T["id"]) => any

Selects the configurable product variants that match the currently applied attributes.

selectConfigurableProductPrices
(productId: T["id"]) => any

Selects all prices for the configurable product variants that match the currently applied attributes.

selectConfigurableProductDiscountedPrices
(productId: T["id"]) => any

Selects all discounted prices for the configurable product variant that match the currently applied attributes.

selectConfigurableProductPercentDiscounts
(productId: T["id"]) => any

Selects all percent discounts for the configurable product variants that match the currently applied attributes.

selectConfigurableProductHasDiscount
(productId: T["id"]) => any

Selects whether or not any variants that match the currently applied attributes have a discount.

selectConfigurableProductMinimumPrice
(productId: T["id"]) => any

Selects the minimum possible price of the configurable product variants that match the currently applied attributes.

selectConfigurableProductMaximumPrice
(productId: T["id"]) => any

Selects the maximum possible price of the configurable product variants that match the currently applied attributes.

selectConfigurableProductMinimumDiscountedPrice
(productId: T["id"]) => any

Selects the minimum possible discounted price of the configurable product variants that match the currently applied attributes.

selectConfigurableProductMaximumDiscountedPrice
(productId: T["id"]) => any

Selects the maximum possible discounted price of the configurable product variants that match the currently applied attributes.

selectConfigurableProductMinimumPercentDiscount
(productId: T["id"]) => any

Selects the minimum possible percent discount of the configurable product variants that match the currently applied attributes.

selectConfigurableProductMaximumPercentDiscount
(productId: T["id"]) => any

Selects the maximum possible percent discount of the configurable product variants that match the currently applied attributes.

isConfigurablePriceRanged
(productId: T["id"]) => any

Selects whether or not the currently applied attributes result in more than one possible price.

selectSelectableConfigurableProductAttributes
(productId: T["id"]) => any

Selects the available/selectable configurable product attributes derived from the order of currently applied attributes and the remaining variants (determined by the currently applied attributes). An attribute might not be selectable if none of the matching variants have that particular attribute.