Quote history is obtained by linking orders that have a matching activeQuoteOrderId. The OrderLookup servlet accepts the quoteOrderHistory input parameter. This parameter indicates whether a quote history should be obtained for an order. Both the flag and the order ID are needed to return quote history. Quote history is obtained when the parameter is set to true.

If the quoteOrderHistory parameter is set to true and a valid order ID is supplied to the orderId parameter the getOrderQueryForQuoteOrderHistory search query is called. This search query looks though the order repository and matches orders that have a corresponding activeQuoteOrderId.

For detailed information on the OrderLookup servlet, refer to the Implementing Order Retrieval and Appendix A: Core Commerce Servlet Beans sections of the Guide to Setting Up a Store.

To obtain the history, you should call the component /atg/commerce/order/
QuoteOrderHistoryLookup
, which contains:

$class=atg.commerce.order.OrderLookup

orderManager=OrderManager
orderLookupService=OrderLookupService
costCenterManager=CostCenterManager
siteGroupManager=/atg/multisite/SiteGroupManager

openStates=\
  pending_quote,\
  quoted

closedStates=\
  rejected

profilePath=/atg/userprofiling/Profile
enableSecurity=true
SearchByOrderId=true

The OrderLookup.getQuoteOrderHistory method uses the OrderLookupService to find the quote history of an order. The OrderLookupService contains the getQuoteOrderHistory and getOrderCountForQuoteOrderHistory methods. The getQuoteOrderHistory method of the OrderLookup class uses the OrderLookupService to find an order’s quote history. It requires the order ID of the order for which the quote history is associated.

The OrderLookupService contains the following methods:

Method

Description

getQuoteOrderHistory

This method returns orders that are related to the OrderID for a quote conversation that starts at the value indicated by the StartIndex parameter. The results can be ordered using the State parameter. This method contains the following parameters:
OrderID – The ID of the order to return quote relatives.
StartIndex – The index into the result set of the first returned order, use 0 to start at the beginning.
NumOrders – The number of orders to return. Use -1 to return all orders.
States – All returned orders have one of the states from the list of states. If this parameter does not contain a value, the results will not be limited by state.
SortPriority – The property to sort the results on. Use null to leave orders unsorted.
Ascending – If true, the orders will be sorted on SortProperty in the ascending order. If false, the results will be sorted in descending order. If SortProperty is null this parameter is ignored.
SiteID – The sites that the orders should belong to. To get all sites, the value of this parameter should be set to null.

getOrderCountForQuoteOrder  History

This method returns a count of the number of orders that met the given criteria.
OrderId – The ID of the order.
States – All counted orders will have a state that is in this list of states. If this parameter does not contain a value the count is not limited by state.
SiteIds – The sites the order should belong to. To get all sites, the value of this parameter should be set to null.

These methods call OrderQueries where the getOrdersForQuoteOrderHistoryInState and getOrdersForQuote methods facilitate the search.

OrderQueries or OrderLookup? returns a collection of orders that a page coder can use to display the information. Within the JSP, a page coder might loop over them using a ForEach droplet and pull out information on pricing adjustments and information on the quote itself through the quoteInfo which is associated with that order.


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