By default, there is no sale pricing configured when using price lists. In the standard pricing model (where the price is stored directly in the SKU in the product catalog) there is a listPrice property and a salePrice property. The SKU also has a boolean onSale property that indicates that the given SKU should be priced using the sale price.

In the price list model, a price repository item has a listPrice (or a complexPrice) but no salePrice. This section describes how to implement sale pricing with price lists.

The quickest way to implement sale pricing using price lists is to create a sale price list.

In this situation, you could store all the list prices for a specific user in one price list and all the sale prices for a specific user in another price list. This set up provides flexibility. For example, you could have different sale prices for two different users, even if they have the same price list normally. It also allows us to inherit sale prices while overriding the list prices (or vice versa).

Follow these steps to implement sale pricing using price lists.

  1. Creating the sale price list

    Create a sale price list the same way you create other price lists. Structurally there is no difference between a sale price list and any other price list.

  2. Assign the sale price list to a user.

    Since we want the flexibility of keeping sale prices completely separate from list prices, user’s will need to have two price lists assigned to them. There will need to be an additional property in the user’s profile to store the salePriceList.

    Note: Oracle ATG Web Commerce users can create an additional property for the user and the contract. Create this new property by copying the priceList property and changing the name.

  3. Pricing an item with a price list

    If you want to price an item without price lists, the following steps occur: There are two precalculators in the ItemPricingEngine. The item is first priced with the list price. The item is then priced with the sale price. The ItemPriceInfo stores both pieces of information, allowing users to calculate the discount that the user received. Price lists use a similar approach:

    The first calculator in the list by default is: /atg/commerce/pricing/calculators/ItemPriceListCalculator

    This is an instance of atg.commerce.pricing.priceLists.ItemPriceCalculator. It configures the name of the profile property that stores the price list as well as the map that configures which calculator to use for each pricingScheme. For sale pricing, create a new instance of this calculator called ItemSalePriceCalculator.

    # The ItemSalePriceCalculator which prices an item on sale



    The following list describes the important properties of ItemSalePriceCalculator:

    You also need to price the configurable items. A ConfigurableItemPriceListSaleCalculator provided out of the box. The ItemPricingEngine defines the following precalculators:


  4. View a price through a JSP using JSP code.

    Using the PriceDroplet servlet bean retrieves the list price. Another instance of this servlet bean retrieves the sale price. For example:


    This servlet bean is used in the same way as the PriceDroplet servlet bean.

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