If your sites use time-based pricing, a price list may have multiple prices for a given product or SKU, with the active price differing depending on when the item is purchased. For example, a product may sell for $100.00 until December 25, and then sell for $50.00 after that.

To control which price values appear in indexed records, the ActivePriceCalculator class enables you to specify a time in the future to use as the effective time for determining prices. For instance, in the example mentioned above, if you run an indexing job on December 24 that uses an effective time of noon on December 26 for pricing, the record generated for the product will include a price value of $50.00.

You can specify the effective time for determining prices either as an explicit time or as an offset from the indexing start time. The /atg/search/repository/BulkLoaderand /atg/search/repository/IncrementalLoader components determine the time when an indexing job is started, and store this value in the atg.repository.search.indexing.Context object. The effective time for determining prices is calculated relative to this indexing start time. The indexing start time remains unchanged throughout the entire indexing job, to ensure that the prices in all of the generated records reflect the same effective time, regardless of how long the indexing job takes.

ActivePriceCalculator provides two properties for specifying the effective time for determining the prices in an indexing job:

Note that if indexingTimeCalendarString is set to a series of times, the effective time used for pricing for an individual indexing job is the first time in the series after the indexing start time. For example, if you use the indexingTimeCalendarString value above and you start an indexing job on the 8th of a month, the effective time will be the 15th of that month at 3:05 pm. If you start an indexing job on the 16th of a month, the effective time will be the 1st of the following month at 3:05 pm.

The indexingTimeOffsetInHours and indexingTimeCalendarString properties are mutually exclusive. If both properties are set, the value of indexingTimeCalendarString is used, and indexingTimeOffsetInHours is ignored. If neither property is set, the indexing start time is used as the effective time for determining prices.

For more information about time-based pricing, see the Core Commerce Programming Guide.


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