Class CookieFieldServiceExtensionHandler

java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.openadmin.web.rulebuilder.service.AbstractRuleBuilderFieldServiceExtensionHandler
org.broadleafcommerce.admin.web.rulebuilder.service.extension.CookieFieldServiceExtensionHandler
All Implemented Interfaces:
org.broadleafcommerce.common.extension.ExtensionHandler, RuleBuilderFieldServiceExtensionHandler

public class CookieFieldServiceExtensionHandler extends AbstractRuleBuilderFieldServiceExtensionHandler
Add configured cookies as fields to request-based rule builder.

Configuration is generally as easy as enabling the feature via a property and then configuring one or more cookie configurations.

Add cookie.content.targeting.enabled=true to a property file visible to both admin and site (i.e. common-shared.properties)

Add a cookie configuration to your Spring xml or Java configuration. Sample below demonstrated Java-based config: @author Jeff Fischer @Merge("blCookieRuleConfigs") public RuleDTOConfig myCookieRuleDTOConfig() { RuleDTOConfig config = new RuleDTOConfig("myFieldName", "myLabel"); config.setAlternateName("cookieName"); return config; }