Enum ProductOptionType
- All Implemented Interfaces:
Serializable
,Comparable<ProductOptionType>
Out of the box forms that a
ProductOption
can take. For more information on the types see
the documentation for product options
.- Author:
- Phillip Verheyden (phillipuniverse)
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe user input flow into a global cart-level attribute when added to cart.The user value is intended to flow into an item attribute once this item is added to the cart.Allows the user to select an additional item that is added to their cartValues selected by the customer will help distinguish a specific variant directly on this Product that should be added to the cart. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isAttributeChoice
(String optionType) static boolean
isCartAttributeChoice
(String optionType) static boolean
isCartItemAttributeChoice
(String optionType) static boolean
isItemChoice
(String optionType) static boolean
isVariantDistinguishing
(String optionType) static ProductOptionType
Returns the enum constant of this type with the specified name.static ProductOptionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VARIANT_DISTINGUISHING
Values selected by the customer will help distinguish a specific variant directly on this Product that should be added to the cart. Example would be to set up t-shirts with colors and sizes. This is similar toCART_ITEM_ATTRIBUTE
in that the values the user selected are stored in the item attributes. -
ITEM_CHOICE
Allows the user to select an additional item that is added to their cart -
CART_ITEM_ATTRIBUTE
The user value is intended to flow into an item attribute once this item is added to the cart. -
CART_ATTRIBUTE
The user input flow into a global cart-level attribute when added to cart. If there was already an entry for this attribute, it is overridden with the latest value
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isItemChoice
-
isCartItemAttributeChoice
-
isCartAttributeChoice
-
isVariantDistinguishing
-
isAttributeChoice
-