OrderItemDisplay URL

Lists all order items that are in pending state.

URL

OrderItemDisplay

Controller command

com.ibm.commerce.orderitems.commands.OrderItemDisplayCmd

Implementation class

com.ibm.commerce.orderitems.commands.OrderItemDisplayCmdImpl

Commands called

URL structure

http:// host_name/ path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.

This diagram displays the structure for the OrderItem Display.

Parameter values

forUser
The logon ID of another user on whose behalf the command will be run. Only a person with the authority to to perform the "becomeUser" action on this command can specify this parameter and run the OrderItemDisplay command on behalf of another user.
forUserId
Same as forUser, but identifying the user by the internal user ID as found in the USERS table.
langId
Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
storeId
The reference number of the store for the orders to list. If you omit this parameter, the session storeId is used. It is an error if you omit this parameter and there is no storeId in the session.
orderId
Specifies zero or more orders, using order reference numbers or one of the following special abbreviations: ".", "*", ".t", or "*t". See Order abbreviations for a description of these abbreviations. If this parameter is omitted, the default is "*". The specified orders must belong to the specified store. (Otherwise, the com.ibm.commerce.order.utils.ResolveOrdersCmd task command will throw an ECApplicationException specifying the _ERR_INVALID_ORDER_REFNUM error message.) This parameter can be repeated.
outOrderName
Specifies the names of name-value pairs to be added to the response properties passed to the view command. The value of each added name-value pair is an array of the reference numbers of the specified orders. If this parameter is omitted, its value defaults to "orderId". This parameter can be repeated.
addressId
The reference number of the address for the items to display. If this parameter is omitted, all order items for the specified orders are displayed.
remerge
A list of the order items that should be merged with other order items in the same order and with the same correlationGroup attribute if possible. This parameter can be repeated.
merge
A list of order items that should be merged with other order items in the same order if possible, regardless of their correlationGroup attributes. This parameter can be repeated.
check
A list of order items that should be checked by the com.ibm.commerce.fulfillment.commands.CheckInventoryAvailabilityCmd task command. This parameter can be repeated.
allocate
A list of order items that should be allocated from existing inventory. This parameter can be repeated.
backorder
A list of order items that should be allocated from expected inventory. This parameter can be repeated.
reverse
A list of order items whose allocations should be released (that is, de-allocated from existing or expected inventory as appropriate). This parameter can be repeated.
doPrice
Specifies whether the command should perform the price calculation subtasks. Set to either do the price tasks (Y), or not (N). Turning off these tasks might result in better performance, but customers might not get the most current price, or product entitlement, when changes occur.
doInventory
Specifies whether the command should perform the inventory calculation subtasks. Set to either do the price tasks (Y), or not (N). Turning off these tasks might result in better performance, but customers might not get the most current inventory level, when changes occur.
Note: The remerge, merge, check, allocate, backorder and reverse parameters are applicable only if ATP inventory is enabled. (See the INVENTORYSYSTEM column in the STORE table.) They represent lists of order items that will be passed to the DoInventoryAction task command which calls com.ibm.commerce.fulfillment.commands.AllocateInventoryCmd task command, which invokes the com.ibm.commerce.fulfillment.commands.CheckInventoryAvailabilityCmd, com.ibm.commerce.fulfillment.commands.AllocateExistingInventoryCmd, com.ibm.commerce.fulfillment.commands.AllocateExpectedInventoryCmd, com.ibm.commerce.fulfillment.commands.DeallocateExistingInventoryCmd, and com.ibm.commerce.fulfillment.commands.DeallocateExpectedInventoryCmd task commands as specified below. Also, these parameters accept OrderItem abbreviations, which are detailed in the help for Order Management subsystem URLs.

The default ATP parameter values are as follows:

  • remerge=*n
  • merge=*n
  • check=***
  • allocate=*n
  • backorder=*n
  • reverse=*n

Example 1

The following example displays all the products and items that correspond to address reference number 2 and all the customer's pending orders. The reference numbers of these orders are passed to the OrderItemDisplay command using the orderId parameter.


     http://
myhostname/webapp/wcs/stores/servlet/OrderItemDisplay?addressId=2

Example 2

The following example first creates a new order with a single item using the OrderItemAdd command then displays the shipping details for the items.


http://myhostname/webapp/wcs/stores/servlet/OrderItemAdd?catEntryId=322200305&quantity=1&orderId=**&URL=OrderItemDisplay

Example 3

The following example shows how to use doPrice and doInventory parameters. In this example, order item prices are not refreshed if the item is not expired, and inventory actions are not performed.


http://myhostname/webapp/wcs/stores/servlet/OrderItemDisplay?orderId=1234
&storeId=10001&catalogId=10001&doPrice=N&doInventory=N

Behavior

Validate the address Id and refresh it if invalid

For all order items in the given order:
  • Call UpdateShippingAddressCmd to update the shipping address if the address Id has been refreshed
  • Call CheckAndResetOrderItemPriceFlagCmd to check and reset the bit price flag if the price has expired
  • Call ResolveOrderItemPriceCmdImpl to calculate the best price and update the order total
  • Pass in parameter doPrice to ResolveOrderItemPriceCmd to control whether the order items can skip pricing again
  • Call OrderItemsCmdHelper to update the total product
  • Call OrderItemsCmdHelper to verify trading and payment methods if required
  • If doInventory = Y, call DoInventoryActionCmd to check inventory
  • If the passed in parameter deleteOrderitemOutof Stock indicates delete:
    • If the passed in parameter deleteOrderitemOutof Stock indicates delete:
  • Otherwise:
    • If ATP: Throw an exception if out of stock
    • If non-ATP: Add a trace to the log

Exception conditions

  • If the specified address reference number does not refer to an existing address object in the ADDRESS database table, the command throws an ECApplicationException with error message _ERR_INVALID_ADDR and error view GenericApplicationError.
  • If the PRICEREFFLAGS of the STORE database table indicates that none of the trading agreements for an order item are available to the user of the order item, the command throws an ECApplicationException with error message _ERR_NO_ELIGIBLE_TRADING and error view GenericApplicationError.
  • If the task command did not return a price for an order item, the command throws an ECApplicationException with error message _ERR_RETRIEVE_PRICE and error view GenericApplicationError.
  • If an order item specifies a configurationId but there are no components in the OICOMPLIST database table with that configurationId for the order item, the command throws an ECApplicationException with error message _ERR_INVALID_COMPONENT_LIST and error view GenericApplicationError.
  • If the task command did not return a price for an order item component or an order item component specifies a price in a currency that is different from (and not convertible to) the currency of the order item, the command throws an ECApplicationException with error message _ERR_COMPONENT_PRICE_CALCULATION and error view GenericApplicationError.
  • If order items have trading agreements that specify payment methods incompatible with those of other items in the order or that specify accounts that are different from those of other items in the order, the command throws an ECApplicationException with error message _ERR_TRADINGS_INCOMPATIBLE_ACCOUNT_PAYMENT and error view InvalidInputErrorView.