Class Name |
|
---|---|
Component(s) |
|
ShippingGroupDroplet
is a servlet bean that initializes ShippingGroup
objects and CommerceItemShippingInfo
objects for use by the ShippingGroupFormHandler
form handler. The ShippingGroupDroplet
class is composed of the following containers:
ShippingGroupMapContainer
– a container for theShippingGroup
objects that represent the user’s authorized shipping groups.CommerceItemShippingInfoContainer
– a container for theCommerceItemShippingInfo
objects for the commerce items in the user’s order.
For more information on these containers, the ShippingGroupDroplet
servlet bean, and the ShippingGroupFormHandler
form handler, refer to the Preparing a Complex Order for Checkout section in the Configuring Purchase Process Services chapter in the ATG Commerce Programming Guide.
Input Parameters
clear
When this parameter is set to True
, ShippingGroupDroplet
clears both the user’s CommerceItemShippingInfoContainer
and ShippingGroupMapContainer
.
clearShippingGroups
When this parameter is set to True
, ShippingGroupDroplet
clears the user’s ShippingGroupMapContainer
.
clearShippingInfos
When this parameter is set to True
, ShippingGroupDroplet
clears the user’s CommerceItemShippingInfoContainer
. This should be done at least once per Order
to create fresh CommerceItemShippingInfo
objects that refer to the unique CommerceItem
objects in each Order
.
createOneInfoPerUnit
When set to True
, ShippingGroupDroplet
creates a CommerceItemShippingInfo object for each individual unit contained in each CommerceItem. For example, a CommerceItem with a quantity of five will have five CommerceItemShippingInfo objects created for it. If a user has a default ShippingGroup in his or her profile, each CommerceItemShippingInfo object is initialized with that ShippingGroup. Set to False
by default.
initBasedOnOrder
When set to True
, ShippingGroupDroplet
creates a CommerceItemShippingInfo
object for each ShippingGroupCommerceItemRelationship
object in the Order
. The CommerceItemShippingInfo
is initialized with the ShippingGroup
that exists in the ShippingCommerceItemRelationship
. This option is provided for the scenario where a customer has already gone part way through the checkout process and the order already contains some ShippingGroupCommerceItemRelationship
objects. Set to False
by default.
initShippingGroups
When this parameter is set to True
, the ShippingGroup
types supplied in the shippingGroupTypes
input parameter will be initialized.
initShippingInfos
When set to True
, ShippingGroupDroplet
creates a CommerceItemShippingInfo
object for each CommerceItem
in the Order
. If a user has a default ShippingGroup
in his or her profile, the CommerceItemShippingInfo
object is initialized with that ShippingGroup
. Set to True
by default.
order
This parameter may be used to override the component’s default setting for the user’s order.
shippingGroupTypes
A comma-separated list of ShippingGroup
types, such as hardgoodShippingGroup
or electronicShippingGroup
, that is used to determine which ShippingGroupInitializer
components are executed.
The ShippingGroupInitializer
components are responsible for creating and initializing the appropriate ShippingGroup
objects and adding them to the ShippingGroupMap
container. Each possible ShippingGroup
type is configured to reference a ShippingGroupInitializer
component in the ShippingGroupInitializers
ServiceMap
. The keys into the map are the Strings
supplied in this shippingGroupTypes
input parameter; the values are the underlying ShippingGroupInitializer
components that do the initialization work for that ShippingGroup
type.
By default, the ShippingGroupDroplet
servlet bean is configured with the following ShippingGroupInitializer
components:
## ServiceMap of shippingGroupTypes to ShippingGroupInitializer Nucleus components shippingGroupInitializers=\ hardgoodShippingGroup=/atg/commerce/order/purchase/ HardgoodShippingGroupInitializer,\ electronicShippingGroup=/atg/commerce/order/purchase/ ElectronicShippingGroupInitializer
Output Parameters
shippingGroups
The Map referenced by the ShippingGroupMapContainer
.
order
The Order
object that represents the user’s order.
Open Parameters
output
The open parameter rendered always.
Example
This example creates HardgoodShippingGroup
objects based on their availability for the current user. Additionally, it creates CommerceItemShippingInfo
objects, which facilitate the association between any CommerceItems
in the Order
and any of the user’s HardgoodShippingGroup
objects.
<dsp:droplet name="ShippingGroupDroplet"> <dsp:param value="true" name="clear"/> <dsp:param value="hardgoodShippingGroup" name="shippingGroupTypes"/> <dsp:param value="true" name="initShippingGroups"/> <dsp:param value="true" name="initShippingInfos"/> <dsp:oparam name="output"> Manipulation of objects here… </dsp:output> </dsp:droplet>