When building a product catalog, you must decide whether your site requires dynamic product pricing and, if so, how granular you need it to be. Using dynamic pricing on a product page can cause a significant decrease in performance compared to using static pricing. (A product or SKU that is priced statically just displays a price amount, for example a list price or a sale price, as a property of the object whose price is being shown. For more information, see How Static Pricing Works.)

Many sites do not need to show dynamic pricing on product pages. For these sites, it is acceptable to show dynamic prices only when a customer places items in the shopping cart. For example, suppose you send a specific group of customers a coupon for 20% off all blue items. On the product pages of the site, blue items appear with their static list or sale price, which is the same for all customers. However, when a customer with the “20% off” coupon adds a blue item to his or her shopping cart, dynamic pricing takes effect, and the item price appears on the Shopping Cart or Checkout page (for example) with a discount of 20%.

If you do decide to use dynamic pricing on product pages, you can still ensure a high level of performance by using the pricing features selectively. You can use dynamic pricing on certain product templates and static pricing on others. You can also choose to restrict dynamic pricing to certain types of customers (for example, registered visitors only).

Even if you decide not to display dynamic pricing on a product page, dynamic pricing still occurs on the shopping cart and purchase process pages.

For more information on dynamic pricing, refer to the sections on the PriceItem and the PriceEachItem servlet beans in the ATG Commerce Guide to Setting Up a Store.

How Static Pricing Works

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 ATG 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 is taken from the default ATG 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 more information about the Switch servlet bean, see Appendix B: ATG Servlet Beans in the ATG Page Developer’s Guide.

 
loading table of contents...