Class ProductOptionsProcessor
java.lang.Object
org.broadleafcommerce.core.web.processor.ProductOptionsProcessor
- All Implemented Interfaces:
org.broadleafcommerce.common.web.expression.BroadleafVariableExpression,ProductOptionsExpression
@Component("blProductOptionsProcessor")
@ConditionalOnTemplating
public class ProductOptionsProcessor
extends Object
implements ProductOptionsExpression
This processor will add the following information to the model, available for consumption by a template:
-pricing for a sku based on the product option values selected
-the complete set of product options and values for a given product
- Author:
- jfridye
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.core.catalog.service.CatalogServiceprotected ProductOptionsProcessorExtensionManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAllProductOptionsToModel(Map<String, Object> newModelVars, org.broadleafcommerce.core.catalog.domain.Product product) protected voidaddProductOptionPricingToModel(Map<String, Object> newModelVars, org.broadleafcommerce.core.catalog.domain.Product product, Long addOnXrefId) createPricingDto(org.broadleafcommerce.core.catalog.domain.Sku sku, List<Long> productOptionValueIds, Long addOnXrefId) getDataAddOn(Long productId, Long addOnXrefId) getName()intprotected void
-
Field Details
-
JSON_CACHE
-
catalogService
protected org.broadleafcommerce.core.catalog.service.CatalogService catalogService -
extensionManager
-
-
Constructor Details
-
ProductOptionsProcessor
public ProductOptionsProcessor()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.broadleafcommerce.common.web.expression.BroadleafVariableExpression- Specified by:
getNamein interfaceProductOptionsExpression
-
getPrecedence
public int getPrecedence()- Specified by:
getPrecedencein interfaceProductOptionsExpression
-
getData
- Specified by:
getDatain interfaceProductOptionsExpression
-
getDataAddOn
- Specified by:
getDataAddOnin interfaceProductOptionsExpression
-
addProductOptionPricingToModel
-
createPricingDto
protected ProductOptionsProcessor.ProductOptionPricingDTO createPricingDto(org.broadleafcommerce.core.catalog.domain.Sku sku, List<Long> productOptionValueIds, Long addOnXrefId) -
addAllProductOptionsToModel
-
writeJSONToModel
-