With static pricing, each item in the catalog has a list price stored in the listPrice property of the catalog repository. You display the price on the appropriate site pages, and the Commerce pricing services can then use that price as a base for calculating order totals, shipping costs, and sales tax.

Optionally, you can maintain more than one price per item. For example, you can give each item a fixed sale price in addition to its list price by specifying a value for the salePrice property in the catalog repository. When you want the alternate price to take effect, use the Switch servlet bean with the onSale property from the Catalog repository. The following example uses the default Commerce product catalog:

<dsp:droplet name="/atg/dynamo/droplet/Switch">
  <dsp:param param="sku.onSale" name="value"/>
  <dsp:oparam name="false">
    List price of <dsp:valueof param="sku.listPrice" converter="currency"/>
  </dsp:oparam>
  <dsp:oparam name="true">
    List price of <dsp:valueof param="sku.listPrice" converter="currency"/>
    on sale for <dsp:valueof param="sku.salePrice" converter="currency"/>!
  </dsp:oparam>
</dsp:droplet>

For information about the Switch servlet bean, see Appendix B: ATG Servlet Beans in the ATG Page Developer's Guide.


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