Commerce Service Center provides two default shipping group types: hard goods and electronic goods. Shipping group types are configured using the atg.commerce.csr.order.
CommerceTypeConfiguration
class. The following information describes how to reconfigure the default shipping group types or to configure new types.

The shipping group configuration files and the shipping group page fragment configuration files are available at the following locations:

File

Location

Configuration File

/DCS-CSR-UI/config/atg/commerce/custsvc/ui/

Page Fragments

/DCS-CSR-UI/j2ee-apps/DCS-CSR-UI/include/order/

Display JSPs

/DCS-CSR-UI/j2ee-apps/DCS-CSR-UI/include/order/

Add and Edit JSPs

/DCS-CSR-UI/j2ee-apps/DCS-CSR-UI/panels/order/shipping/

Display Page Fragments

To change how your shipping groups are displayed, you must modify the displayPageFragment property page fragment file. Each shipping group type defines three display values that appear on various pages. A display value consists of a title and content and is configured in the display page fragment JSP file, where the three display values are identified in the file as value1, value2 and status.

You can customize the default display values for the existing shipping group types. However, if you create new shipping group types, each new shipping group type must have a defined set of display values.

The following display values are configured for the hard good shipping type:

Value

Title

Content

Example

Value1

Shipping Address

[first] [last]
[address 1]
[address 2]
[city], [state] [zip code] [country]
[phone number]

Bob Smith
119 Grand Street
Apt. 1509
Brooklyn, NY 10023
USA
212-555-4321

Value2

Shipping Method

[shipping method]

Ground

Status

Status

[shipping group status]

Ready to Ship

The following display details are configured for the electronic shipping group type:

Value

Title

Content

Example

Value1

Electronic Address

[email address]

bsmith@company.com

Value2

Blank

[blank]

Blank

Status

Status

[shipping group status]

Emailed

Display details are used on the following pages for both shipping group types, unless otherwise indicated:

Display Location

Value1

Value2

Status

Shipping Addresses Page
Shipping Method Page (hard good only)

X

Order Review Page
Return Items Page
Confirmation Emails

X

X

Order View Page
Scheduled Orders Page

X

X

X

The /DCS-CSR-UI/atg/commerce/custsvc/ui/HardGoodShippingGroupConfiguration.
properties
and ElectronicGoodShippingGroupConfiguration.properties files hold all of the properties of the page fragments. The following is an example of the HardGoodShippingGroupConfiguration.properties file:

$class=atg.commerce.csr.order.CommerceTypeConfiguration

addPageFragment=/atg/commerce/custsvc/ui/fragments/order/
   AddHardgoodShippingGroup
editPageFragment=/atg/commerce/custsvc/ui/fragments/order/
   EditHardgoodShippingGroup
displayPageFragment=/atg/commerce/custsvc/ui/fragments/order/
   DisplayHardgoodShippingGroup
imagePageFragment=/atg/commerce/custsvc/ui/fragments/order/
   HardgoodShippingGroupImage
type=hardgoodShippingGroup
addPageFragmentTitleKey=addHardgoodShippingGroupTitle
editPageFragmentTitleKey=editHardgoodShippingGroupTitle
imageHoverTextKey=hardgoodShippingGroupImageHoverText
resourceBundle=atg.commerce.csr.order.WebAppResources

The DisplayHardgoodShippingGroupConfiguration.properties file identifies the location of your page fragment JSP file and the servletContext. For example:

$class=atg.web.PageFragment

URL=/include/order/displayHardgoodShippingGroup.jsp
servletContext=DCS-CSR

The displayHardgoodShippingGroup.jsp file contains the values for the display details, including the title and the content. You must modify the value1, value2 and status properties with your custom information. The combination of these parameters defines one display value, such as value1:

Example: Shipping Group Display Page Fragment Components

The following is a portion of the default configuration of the displayhardgoodShippingGroup.jsp file. In this example, the displayHeading parameter, which defines the display value1 title, is set to use the Shipping Address header. The displayValue parameter, which defines the display value1 content, is set to use the addressView.jsp fragment:

<c: if test="${propertyName == 'value1'}">
  <c: if test="${displayHeading == true}">
    <fmt: message key="shipping.address.header"/>
  </c: if>
  <c: if test="${displayValue == true}">
    <dsp: include src="/include/addresses/addressView.jsp"
       otherContext="${csrConfigurator.contextRoot}">
          <dsp: param name="address" value="${address}"/>
    </dsp: include>
  </c: if>

To display your customized shipping group title and content, modify the displayHeading and displayValues accordingly. For example, in the displayElectronicShippingGroup.jsp file, the value1 title has been modified to define the displayHeading as Electronic Address and the displayValue as emailAddress:

<c: if test="${propertyName == 'value1'}">
  <c: if test="${displayHeading == true}">
    <fmt: message key='shippingSummary.electronicAddress.header'/>
  </c: if>
  <c: if test="${displayValue == true}">
    <li>
      <c: out value="${shippingGroup.emailAddress}"/>
    </li>
  </c: if>
</c: if>

As noted above, the title and content for value1 is shown on the Shipping Addresses, Shipping Method (hard good only), Order Review, Return Items, Order View, Scheduled Orders pages and on confirmation e-mails. You may also modify the value2 property as needed. Note that electronic shipping groups do not use the value2 property by default, so it is left blank. You may add the displayHeading and displayvalues to the property as required.

Other components that can be customized within the display page fragment include the status property. This property is used to identify the status of the group object and displayed only on the Order View and the Scheduled Order pages. The default title for both the hard good and electronic shipping group is Status, and the content defaults to shippingGroup.stateAsString. Modify the heading of the display value to point to your customized information as needed:

<c: if test="${propertyName == 'status'}">
  <c: if test="${displayHeading == true}">
    <fmt: message key='shippingSummary.shippingStatus.header'/>
  </c: if>
  <c: if test="${displayValue == true}">
  <dsp: droplet name="ShippingGroupStateDescriptions">
    <dsp: param name="state" value="${shippingGroup.stateAsString}"/>
    <dsp: param name="elementName" value="stateDescription"/>
    <dsp: oparam name="output">
      <dsp: droplet name="IsHighlightedState">
        <dsp: param name="obj" value="${shippingGroup}"/>
        <dsp: oparam name="true">
            <span class="atg_commerce_csr_dataHighlight"><dsp: valueof
              param="stateDescription"></dsp: valueof></span>
        </dsp: oparam>
        <dsp: oparam name="false">
          <dsp: valueof param="stateDescription"></dsp: valueof>
        </dsp: oparam>
      </dsp: droplet>
    </dsp: oparam>
  </dsp: droplet>
  </c: if>
</c: if>

The selectOptionText property is used to identify the information that is presented in the address drop down on the Ship to Multiple Addresses and Split Quantity pages. By setting the displayValue, you configure what address information is presented in the drop down. For example, the default configuration for the hard good shipping group contains the following:

<c: if test="${propertyName == 'selectOptionText'}">
  <c: if test="${displayValue == true}">
    ${fn: escapeXml(address.address1)}${!empty address.address2 ? ' ' : ''
      }${!empty address.address2 ? fn: escapeXml(address.address2) : '' }
  </c: if>
</c: if>

The electronic shipping group selectOptionText property has been modified to include the following:

<c: if test="${propertyName == 'selectOptionText'}">
  <c: if test="${displayValue == true}">
    ${fn: escapeXml (shippingGroup.emailAddress)}
  </c: if>
</c: if>

Modify the display value with your customized page fragment.

Customizing a Shipping Group Type

For additional information on creating customized Shipping Groups, refer to the Working with Purchase Process Objects chapter of the ATG Commerce Programming Guide.

  1. Refer to the Order Tools section of the ATG Commerce Programming Guide to create a new shipping group type. This includes defining the type-to-class name mapping for ShippingGroup objects.

  2. Refer to the Create a Shipping Group section of the ATG Commerce Programming Guide to create the shipping group.

    Note: If you do not want to initialize the custom shipping group types using the ShippinGroupDroplet, continue on to step 5.

  3. Write a new ShippingGroupInitializer implementation. The initializeShippingGroups() method should gather the user’s ShippingGroups by type and add them to the ShippingGroupMapContainer referenced by the ShippingGroupFormHandler.

  4. Open your custom application and modify ShippingGroupDroplet.properties shippingGroupInitializers parameter by adding your new shipping group type. For example:

    /DCS-CSR-UI/atg/commerce/custsvc/order/ShippingGroupDroplet.properties
    ## ServiceMap of shippingGroupTypes to ShippingGroupInitializer
    Nucleus components

    shippingGroupInitializers+=\
    newShippingGroup=/atg/commerce/custsvc/order/NewShippingGroupInitializer

  5. Update the /atg/commerce/custsvc/util/CSRConfigurator.properties file shippingGroupTypesToBeInitialized property and shippingGroupTypeConfigurations property to include your new shipping group type. This configuration initializes shipping group types in the ShippingGroupDroplet.

    Initialize your new shipping group type by adding your new shipping group type to the shippingGroupTypesToBeInitialized property. For example:

    /atg/commerce/custsvc/util/CSRConfigurator.properties

    ## Shipping group fragment settings
    shippingGroupTypesToBeInitialized= newShippingGroup
    shippingGroupTypeConfigurations+=\
      /atg/commerce/custsvc/ui/NewShipingGroupConfiguration

  6. Add the CommerceTypeConfiguration component to the shippingGroupTypeConfigurations property for any new supported shipping group type.


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