Class Name

atg.commerce.order.purchase.RepriceOrder

Component(s)

/atg/commerce/order/purchase/RepriceOrderDroplet

The RepriceOrderDroplet servlet bean is an instance of atg.commerce.order.purchase.RepriceOrder, which extends atg.service.pipeline.servlet.PipelineChainInvocation. The RepriceOrder class provides the objects that are needed to execute a repricing pipeline chain as convenient properties. Typically, execution of a repricing pipeline chain requires the Order, the Profile, the OrderManager, and the user’s PricingModelHolder. While the PipelineChainInvocation class is flexible enough to handle these requirements (and enable you to configure the properties as required in a Map), RepriceOrder is conveniently configured to reference these objects. This means the page developer doesn’t need to supply them as input parameters every time RepriceOrderDroplet is invoked.

By default, RepriceOrderDroplet is configured to invoke the repriceOrder pipeline chain to reprice an order. As such, it provides a mechanism for updating the price of an order every time a customer accesses the shopping cart page. This is useful if your sites enable customers to access their shopping carts through non-form actions, such as standard hyperlinks. Because of dynamic pricing, customers could potentially view inaccurate prices in their shopping carts when accessing the shopping cart through a hyperlink.

For more information on repricing an order, refer to the Repricing Orders section and the Checking Out an Order section in the Configuring Purchase Process Services chapter in the Core Commerce Programming Guide. Also refer to the Repricing Shopping Carts section in the Implementing Shopping Carts chapter. For more information on the repriceOrder pipeline chain, refer to the Core Commerce Programming Guide.

Input Parameters

pricingOp (Required)
The pricing operation to be executed. Acceptable pricing operations are defined in the atg.commerce.pricing.PricingConstants interface and are listed in the following table.

Pricing Operation

Pricing Constant

ORDER_TOTAL

PricingConstants.OP_REPRICE_ORDER_TOTAL

ORDER_SUBTOTAL

PricingConstants.OP_REPRICE_ORDER_SUBTOTAL

ORDER_SUBTOTAL_SHIPPING

PricingConstants.OP_REPRICE_ORDER_SUBTOTAL_SHIPPING

ORDER_SUBTOTAL_TAX

PricingConstants.OP_REPRICE_ORDER_SUBTOTAL_TAX

ITEMS

PricingConstants.OP_REPRICE_ITEMS

SHIPPING

PricingConstants.OP_REPRICE_SHIPPING

ORDER

PricingConstants.OP_REPRICE_ORDER

TAX

PricingConstants.OP_REPRICE_TAX

NO_REPRICE

PricingConstants.OP_NO_REPRICE

priceList
The ID of the pricelist to use. If you don’t specify this parameter, but you use pricelists to determine the order price, the pricelist specified for the active user is used. This parameter lets you provide an alternate pricelist.

chainId
The ID of the pipeline chain to execute. If this parameter is not set, then the servlet bean looks for a configured pipeline chain ID in the defaultChainId property. By default, RepriceOrderDroplet.defaultChainId is set to repriceOrder.

paramObject
A parameter Object used as an argument to the runProcess method of the PipelineManager during pipeline chain execution. If this parameter is not set, then the servlet bean looks for a configured value in the extraParametersMap property. It uses the configured value to construct a HashMap to use as an argument to the PipelineManager during pipeline chain execution. extraParametersMap represents a mapping of the new Hash Map’s keys to the request parameters that are bound to the new Hash Map’s values. By default, RepriceOrderDroplet.extraParametersMap is empty.

pipelineManager
The PipelineManager instance to use for pipeline chain execution. If this parameter is not set, then the servlet bean looks for a configured PipelineManager in the defaultPipelineManager property. By default, RepriceOrderDroplet.defaultPipelineManager is set to /atg/commerce/PipelineManager.

Output Parameters

exception
Any exception that occurred during the repricing process.

pipelineResult
The PipelineResult instance returned by the PipelineManager after a successful pipeline chain execution.

Open Parameters

success
The parameter rendered after successful execution of the pipeline chain.

successWithErrors
This parameter is rendered after a successful pipeline chain execution that contains error messages in the PipelineResult object.

failure
The parameter rendered after an unsuccessful attempt to execute the pipeline chain.

Example
<dsp:droplet name="RepriceOrderDroplet">
  <dsp:param value="ORDER_SUBTOTAL" name="pricingOp"/>
</dsp:droplet>

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