The PriceSlider cartridge allows a Commerce Reference Store shopper to refine the current results list based on the active price of the skus associated with the currently displayed products. The active price is defined as the price that is in effect for the current user on the current site. The PriceSlider has two controls that indicate a minimum and maximum price. Items whose active price falls within these two values are included in the results list. A shopper can click and drag the minimum or maximum control to alter the price range to be displayed; alternatively, a shopper can drag the entire range up or down. Upon mouse release, a POST request is sent to the server to retrieve the new results list and the page is refreshed.

The PriceSlider applies an Endeca range filter to the current result set. The range filter is applied through an Nf URL parameter that gets added to the POST request. The Nf parameter takes the form of Nf=<record property name>|<function>+<value>. Because the price slider has two controls, a minimum and maximum, the Nf parameter takes two different values and uses the between function. For example:


Note: For more details on the active price, see the Handling Price Data section.


The XML template for the PriceSlider cartridge, located in <ATG10dir>/CommerceReferenceStore/Store/Storefront/deploy/cartridge_templates/Navigation-PriceSlider.xml, must be available for use within the GuidedNavigation cartridge, so its content type is set to Navigation while its ID is set to PriceSlider. The Navigation-PriceSlider.xml file defines one property for the PriceSlider cartridge, priceProperty, that is not editable in Experience Manager. This property specifies the record property that the slider should be based on which, in this case, is sku.activePrice.

Content Item and Handler

The class represents the content item that the PriceSlider cartridge returns to the renderer. The PriceSliderContentItem class has these properties:

The /atg/endeca/assembler/cartridge/handler/PriceSlider component, which is of class, is responsible for creating and populating the PriceSliderContentItem object. The PriceSliderHandler class is an extension of the com.endeca.infront.cartridge.NavigationCartridgeHandler class and it overwrites the preprocess() and process() methods.

The PriceSliderHandler.preprocess() method creates an MDEX request but does not execute it. The process() method executes the MDEX request to get the search results. It also retrieves the current com.endeca.infront.navigation.NavigationState object using the /atg/endeca/assembler/cartridge/manager/NavigationState component referenced by the PriceSliderHandler component’s navigationStateProperty. The NavigationState object contains the navigation choices that have led to the current result set, including any range filters that have been applied and the properties those range filters have been applied to. If an existing range filter has been applied to the sku.activePrice property, it is an indicator that the price slider has already been applied to the current result set and the rendering of the price slider must take into account the existing settings. To do this, the PriceSliderHandler creates a com.endeca.infront.cartridge.model.RangeFilterBreadcrumb object and populates it with data from the range filter. Specifically, the RangeFilterBreadcrumb includes:

The PriceSliderHandler then sets the PriceSliderContentItem.filterCrumb property to reference this RangeFilterBreadcrumb object, thereby making the existing slider settings available to the JSP renderer.

The PriceSliderHandler also sets the slider end points by retrieving the priceSliderMaximumValue and priceSliderMinimumValue properties for the currently searched site (or sites) from the Site repository. The priceSliderMaximumValue and priceSliderMinimumValue properties are site-specific and can be configured through the Site Administration UI. If the current results come from more than one site, the PriceSliderHandler uses the lowest priceSliderMinimumValue and the highest priceSliderMaximumValue from the sites. If no values have been set, PriceSliderHandler uses the defaults of 0 and 1500 for the minimum and maximum values, respectively.

Finally, the PriceSliderHandler evaluates the number of results returned for the query and sets the PriceSliderContentItem.enabled property to true if there is more than one result and false if there is 0 or 1 result.

The PriceSlider component has the following configurable properties:

The PriceSlider component also inherits a number of properties from the /atg/endeca/assembler/cartridge/handler/NavigationCartridgeHandler component, through a $basedOn property configuration. Specifically, PriceSlider inherits a reference to the /atg/endeca/assembler/cartridge/manager/NavigationState component that provides information on the shopper’s current navigation state.

JSP Renderer

The store.war/cartridges/PriceSlider/PriceSlider.jsp page renders the content in the PriceSliderContentItem object. This renderer retrieves the current price slider settings, if any exist, from the PriceSliderContentItem.filterCrumb property. It also retrieves the slider end points from the PriceSliderContentItem.sliderMin and PriceSliderContentItem.sliderMax properties.

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices