public interface ProductOption extends Serializable
A product option represents a value that is entered to specify more information about a product prior to entering into the cart.
For example, a product of type shirt might have product options of "size" and "color".
There is an inherent relationship between product options and product SKUs. A sku is meant to provide a way to override the pricing of a product for a specific set of options. Inventory can also be tracked at the SKU level.
For example, consider a shirt that is sold in 5 colors and 5 sizes. For this example, there would be 1 product. It would have 10 options (5 colors + 5 sizes). The product would have as few as 1 SKu and a many as 26 SKUs.
1 SKU would indicate that the system is not tracking inventory for the items and that all of the variations of shirt are priced the same way.
26 would indicate that there are 25 SKUs that are used to track inventory and potentially override pricing. The extra "1" sku is used to hold the default pricing.
| Modifier and Type | Method and Description |
|---|---|
List<ProductOptionValue> |
getAllowedValues()
Gets the available values that a user can select for this ProductOption.
|
String |
getAttributeName()
Gets the attribute name for where the ProductOptionValue selected for
this ProductOption is stored in the OrderItemAttributes for the
OrderItem
|
Integer |
getDisplayOrder()
Gets the display order of this option in relation to the other
ProductOptions |
String |
getErrorCode() |
String |
getErrorMessage() |
Long |
getId()
Returns unique identifier of the product option.
|
String |
getLabel()
The label to show to the user when selecting from the available
ProductOptionValues. |
ProductOptionValidationStrategyType |
getProductOptionValidationStrategyType() |
ProductOptionValidationType |
getProductOptionValidationType() |
List<Product> |
getProducts()
Deprecated.
use getProductXrefs instead
|
List<ProductOptionXref> |
getProductXrefs() |
Boolean |
getRequired() |
ProductOptionType |
getType()
Returns the option type.
|
Boolean |
getUseInSkuGeneration() |
String |
getValidationString() |
void |
setAllowedValues(List<ProductOptionValue> allowedValues)
Set the allowed values for this ProductOption
|
void |
setAttributeName(String name)
Sets the attribute name that will be used in storing the selected
ProductOptionValue for this ProductOption
|
void |
setDisplayOrder(Integer displayOrder)
Gets the display order of this option in relation to the other
ProductOptions |
void |
setErrorCode(String errorCode) |
void |
setErrorMessage(String errorMessage) |
void |
setId(Long id)
Sets the unique identifier of the product option.
|
void |
setLabel(String label)
Sets the label to show the user when selecting from the available
ProductOptionValues |
void |
setProductOptionValidationStrategyType(ProductOptionValidationStrategyType productOptionValidationType) |
void |
setProductOptionValidationType(ProductOptionValidationType productOptionValidationType) |
void |
setProducts(List<Product> products)
Deprecated.
use setProductXrefs instead
|
void |
setProductXrefs(List<ProductOptionXref> xrefs) |
void |
setRequired(Boolean required)
Sets whether or not
|
void |
setType(ProductOptionType type)
Sets the option type.
|
void |
setUseInSkuGeneration(Boolean useInSkuGeneration) |
void |
setValidationString(String validationString) |
Long getId()
void setId(Long id)
id - ProductOptionType getType()
void setType(ProductOptionType type)
type - String getAttributeName()
OrderItemAttribute}, {@link OrderItem}void setAttributeName(String name)
name - - the name of the OrderItemAttribute to store the selected
ProductOptionValue in the Order domainString getLabel()
ProductOptionValues. This might be "Color" or "Size"void setLabel(String label)
ProductOptionValueslabel - Boolean getRequired()
void setRequired(Boolean required)
required - Integer getDisplayOrder()
ProductOptionsvoid setDisplayOrder(Integer displayOrder)
ProductOptionsdisplayOrder - @Deprecated List<Product> getProducts()
@Deprecated void setProducts(List<Product> products)
products - List<ProductOptionXref> getProductXrefs()
void setProductXrefs(List<ProductOptionXref> xrefs)
List<ProductOptionValue> getAllowedValues()
getAttributeName()void setAllowedValues(List<ProductOptionValue> allowedValues)
allowedValues - Boolean getUseInSkuGeneration()
ProductOptionValidationType getProductOptionValidationType()
void setProductOptionValidationType(ProductOptionValidationType productOptionValidationType)
void setUseInSkuGeneration(Boolean useInSkuGeneration)
void setErrorMessage(String errorMessage)
void setErrorCode(String errorCode)
String getErrorMessage()
String getValidationString()
void setValidationString(String validationString)
String getErrorCode()
void setProductOptionValidationStrategyType(ProductOptionValidationStrategyType productOptionValidationType)
ProductOptionValidationStrategyType getProductOptionValidationStrategyType()
Copyright © 2014. All Rights Reserved.