Thursday, January 5, 2012

ATG Price Lists Overview


Commerce Reference Store uses prices lists, instead of SKU-based pricing, to calculate the prices for items. This section describes how Commerce Reference Store price lists work.

Commerce Reference Store user profiles have two properties, priceList and salePriceList, that specify the price lists assigned to a customer for list prices and sale prices, respectively. These properties are populated by the /atg/dynamo/servlet/dafpipeline/ShoppingContextServlet when the customer logs into Commerce Reference Store or, for stores running the Store.Estore.International module, when the customer chooses a different locale (Germany or USA). Commerce Reference Store ships with four price lists—List Prices, Sale Prices, German List Prices, and German Sale Prices—that ShoppingContextServlet can use when populating priceList and salePriceList for a customer. ShoppingContextServlet is an instance of the atg.projects.store.servlet.pipeline.ShoppingContextServlet class.

When a customer views a SKU, the /atg/commerce/pricing/calculators/ItemListPriceCalculator component uses the customer’s priceList property to calculate the list price for the SKU. Next, the /atg/commerce/pricing/calculators/ItemSalePriceCalculator component uses the salePriceList property to calculate the sale price for the SKU, if one exists. The pricing information for the SKU is stored in an ItemPriceInfo object in the order repository. If a sale price exists for the SKU, the item is marked as on sale in the ItemPriceInfo object.

The /global/gadgets/priceLookup.jsp gadget uses the information in the ItemPriceInfo object to render a SKU’s price information on a page. priceLookup.jsp retrieves the SKU’s list price first, and then it determines if a sale price exists. If one does, priceLookup.jsp shows the list price in strike-through format followed by the sale price. If a sale price doesn’t exist, priceLookup.jsp simply renders the list price.

This illustration shows the product detail page for a SKU that is on sale:


This illustration shows the product detail page for a SKU that is not on sale:





No comments:

Popular Posts