If your Oracle ATG Web Commerce catalog uses price lists, a single item may have multiple prices, with the actual price applied depending on who is purchasing the item. Different customers may be assigned different price lists, and when a customer accesses a product or SKU, the price he or she sees may be different from the price another customer sees.

When a customer searches the product catalog using Oracle Endeca Commerce, the results may depend on the correct prices for that customer being present in the index. For example, the set of products returned by selecting a facet range of $5.00 to $10.00 may depend on the price lists the customer is assigned.

When you index your catalog, the item prices are read from the price lists and used in output records. A separate prop tag is created for each price list, and the property name in the tag identifies the price list the tag is associated with. To read the prices from the price lists, you use a property accessor of class atg.commerce.search.producer.PriceListMapPropertyAccessor. (This class is a subclass of atg.repository.search.indexing.accessor.GenerativePropertyAccessor, which is described in the GenerativePropertyAccessor section.)

Oracle ATG Web Commerce provides a component of this class, /atg/commerce/search/PriceListMapPropertyAccessor. You can specify this property accessor in an EndecaIndexingOutputConfig definition file like this:

<property name="price" type="float"
   property-accessor="pricePropertyAccessor"
   is-non-repository-property="true"/>

The property-accessor attribute is set to pricePropertyAccessor, which is mapped to /atg/commerce/search/PriceListMapPropertyAccessor in the ProductCatalogOutputConfig component. The is-non-repository-property attribute indicates that the property is not actually stored in the catalog repository; this attribute prevents warnings from being thrown when the IndexingOutputConfig component starts up.

When the PriceListMapPropertyAccessor is invoked for an item, it iterates through all available price lists and outputs a separate prop tag for each one. Each tag contains the item price from one price list. The format of the names of the output properties is set through the pricePropertyPrefix property of the PriceListMapPropertyAccessor component. By default, the value of this property is:

sku.price_

The price list ID is appended to this prefix in the tag associated with a given price list. For example, if there are four possible price lists, the output might include:

<PROP NAME="sku.price_plist90001">
  <PVAL>9.99</PVAL>
</PROP>
<PROP NAME="sku.price_plist90002">
  <PVAL>7.99/PVAL>
</PROP>
<PROP NAME="sku.price_plist90003">
  <PVAL>5.99</PVAL>
</PROP>
<PROP NAME="sku.price_plist90004">
  <PVAL>4.99</PVAL>
</PROP>

So, for example, the price for this item in price list pl90003 is 5.99.

If a price list does not have a price for the item, the property accessor determines if the price list inherits a price for the item from another price list. If so, the accessor outputs the inherited price. If the price list does not inherit a price, no entry is output for that price list.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices