You can specify a price list that will be used to price items regardless of what price list is specified in a user’s profile.

ItemPriceCalculator, ConfigurableItemPriceListCalculator, and ConfigurableItemPriceListSaleCalculator all look in pExtraParameters for the price list before looking in the profile. You can set a specific price list by adding an entry to pExtraParameters with a key of profilePriceListPropertyName and a value of the priceList that you with to use (or the ID of the priceList). For example, if extraParameters maps the string priceList to a price list (or a price list ID) and profilePriceListPropertyName is set to priceList (default), then the price list in the map is used instead of the profile’s price list.

One way to implement this is to use the generic pipeline processor AddExtraParamsEntry. It adds pipeline support for specifying price lists. AddExtraParamsEntry adds a string key and string value to the extra parameters map.

To use this with pricing, create a properties file in /atg/commerce/pricing/processor/ with the following code:


Then modify the repriceOrderChain in the commercepipeline.xml as follows:

<pipelinechain name="repriceOrder" transaction="TX_REQUIRED"
   <pipelinelink name="useDifferentPriceList" transaction="TX_MANDATORY">
      <processor jndi="/atg/commerce/pricing/processor/UseDifferentPriceList"/>
      <transition returnvalue="1" link="priceOrderTotal"/>
      <transition returnvalue="2" link="priceOrderTotal"/>
   <pipelinelink name="priceOrderTotal" transaction="TX_MANDATORY">
      <processor jndi="/atg/commerce/pricing/processor/PriceOrderTotal"/>

This causes all orders (regardless of what is in the profile) to be priced with priceList 100012.

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