BEA Logo BEA WebLogic Commerce Server Release 3.1.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WebLogic Commerce Server Doc Home   |   Order Processing Package   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Shipping Services

 

The Order Processing package's Shipping Services record the shipping information related to a customer's order and calculate shipping costs. This topic describes the Shipping Services in detail, and provides information about how you can customize them to meet your specific needs.

This topic includes the following sections:

 


JavaServer Pages (JSPs)

The Order Processing package's Shipping Services consist of three JavaServer Pages (JSPs) that you can use as is, or customize to your own liking. This section describes each of these pages in detail.

shipping.jsp Template

The shipping.jsp template (shown in Figure 4-1) allows the customer to select and input shipping details for the order. Shipping details include the shipping method (such as standard, second day air, and so on), shipping preference (all at once or as items become available) and any special shipping instructions the customer may want to specify.

If the customer is satisfied with the shipping details for the order, the customer can click the Continue button to continue to the next part of the checkout process. If the customer had forgotten something or wanted to do something else to their order, the customer can click the Back button instead.

Sample Browser View

Figure 4-1 shows an annotated version of the shipping.jsp template. The dashed lines and numbers in the diagram are not part of the template; they are referenced in the explanation that follows the screen shot.

Figure 4-1 Annotated shipping.jsp Template

The numbers in the following list refer to the numbered regions in the figure:

  1. The header (top banner) for inner pages is created from an import of the innerheader.jsp template. This is standard across many of the second-level JSP templates provided by WebLogic Commerce Server. The import call is:

    <%@ include file="/commerce/includes/innerheader.jsp" %>

  2. This region displays dynamic data related to the possible shipping methods. This is accomplished using a combination of WebLogic Server and Pipeline JSP tags that obtain and display each shipping method. Along with the other shipping details described in regions 3 and 4, the form then posts the customer's selected shipping method.

  3. This region, called the splitting preference, does not contain dynamic data. There are only two preferences: wait until the entire order is ready before shipping or ship the items as they become available. Along with the other shipping details described in regions 2 and 4, the form then posts the customer's selected splitting preference.

  4. This region of the shipping.jsp template contains a simple input box, allowing the customer to enter any special instructions with regard to shipping. Again, no dynamic data is displayed in this region. Along with the other shipping details described in regions 2 and 3, the form then posts any special instructions the customer specifies.

  5. The shipping.jsp template's content in region 5 of Figure 4-1 contains the included innerfooter.jsp template. The include call in shipping.jsp is:

    <%@ include file="/commerce/includes/innerfooter.jsp" %>

    innerfooter.jsp consists of the horizontal footer at the bottom of the page, plus the right-side vertical column that describes (for the benefit of you and your development team) the name of the current template and links to its About information. In the innerfooter.jsp file, the right-side vertical column is an include file:

    <%@ include file="/commerce/includes/innerrightside.jsp" %> 

Location in the WebLogic Commerce Server Directory Structure

You can find the shipping.jsp template file at the following location, where WL_COMMERCE_HOME is the directory in which you installed WebLogic Commerce Server:

%WL_COMMERCE_HOME%\server\webapps\wlcs\commerce\order\
shipping.jsp
(Windows)
$WL_COMMERCE_HOME/server/webapps/wlcs/commerce/order/
shipping.jsp
(UNIX)

Tag Library Imports

The shipping.jsp template uses WebLogic Server and Pipeline JSP tags. Therefore, the template includes the following JSP tag libraries:

<%@ taglib uri="weblogic.tld" prefix="wl" %>
<%@ taglib uri="pipeline.tld" prefix="pipeline%>

Note: For more information on the WebLogic Server JSP tags, see "JSP Tag Reference" in the BEA WebLogic Personalization Server documentation. For more information about the Pipeline JSP tags, see BEA WebLogic Commerce Server Webflow and Pipeline Management.

These files reside in the following directory for the WebLogic Commerce Server Web application:

%WL_COMMERCE_HOME%\server\webapps\wlcs\WEB-INF (Windows)
$WL_COMMERCE_HOME/server/webapps/wlcs/WEB-INF (UNIX)

Java Package Imports

The shipping.jsp template uses Java classes in the following packages and therefore includes these import statements:

<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="com.beasys.commerce.foundation.pipeline.*" %>
<%@ page import="com.beasys.commerce.axiom.units.*" %>
<%@ page import="com.beasys.commerce.ebusiness.shipping.*" %>
<%@ page import="com.beasys.commerce.webflow.*" %>

Location in Default Webflow

The shipping.jsp template follows the page where the customer manages their shopping cart (shoppingcart.jsp), or any product catalog page where the customer clicks the View Cart button. The next page allows the customer to select a shipping address (selectaddress.jsp).

Notes: If the customer has not yet logged into the site and clicks the Check Out button on the shopping cart page, the customer will be prompted to login at the login.jsp template prior to loading the shipping.jsp. For more information about the login.jsp template, see BEA WebLogic Commerce Server Registration and User Processing Package.

For more information about the default Webflow, see Overview of the Order Processing Package.

Included JSP Templates

The following JSP templates are included in the shipping.jsp template:

Events

The shipping.jsp template presents a customer with two buttons, each of which is considered an event. Each event triggers a particular response in the default Webflow that allows customers to continue. While this response can be to load another JSP, it is usually the case that an input processor or Pipeline is invoked first. Table 4-1 provides information about these events and the business logic they invoke.

Table 4-1 shipping.jsp Events

Event

Webflow Response(s)

button(back)

No business logic required. Loads shoppingcart.jsp.

button(continue)

ValidateShippingInfoIP

Dynamic Data Display

One purpose of the shipping.jsp template is to display information about the possible shipping methods for the order. This is accomplished on shipping.jsp using a combination of WebLogic Server JSP tags, Pipeline JSP tags and accessor methods/attributes.

First, the getPipelineProperty JSP tag retrieves the SHIPPING_METHOD_LIST attribute from the Pipeline session. Table 4-2 provides more detailed information about this attribute.

Table 4-2 shipping.jsp Dynamic Data Specification

Attribute

Type

Description

PipelineSessionConstants.SHIPPING_METHOD_LIST

List of com.beasys.commerce.ebusiness.shipping.ShippingMethodValue

The list of available shipping methods.

Listing 4-1 illustrates how this attribute is retrieved from the Pipeline session.

Listing 4-1 Retrieving the Shipping Method Attribute


<pipeline:getPipelineProperty
propertyName="<%PipelineSessionConstants.SHIPPING_METHOD_LIST%>"
returnName="shippingMethodList"
returnType="java.util.List"/>


Note: For more information on the getPipelineProperty JSP tag, see BEA WebLogic Commerce Server Webflow and Pipeline Management.

The data stored within this Pipeline session attribute is then accessed by using accessor methods/attributes within Java scriptlets. Table 4-3 provides more detailed information about these methods for ShippingMethodValue.

Table 4-3 ShippingMethodValue Accessor Methods/Attributes

Method/Attribute

Description

description

A description of the shipping method.

identifier

Key in the database for the shipping method.

Listing 4-2 illustrates how these accessor methods/attributes are used within Java scriptlets.

Listing 4-2 Using Accessor Methods within shipping.jsp Java Scriptlets


<table>

<tr>
<td colspan=2>
<b>Select Shipping Method</b>
</td>
</tr>

<wl:repeat set="<%=shippingMethodList%>" id="shippingMethodValue"
type="ShippingMethodValue" count="100"

<tr>
<td>
<input type="radio" name="<%HttpRequestConstants.SHIPPING_METHOD%>"
value="<%=shippingMethodValue.identifier%>">
</td>
<td>
<%=shippingMethodValue.description%>
</td>
</tr>

</wl:repeat>

</table>


Note: For more information on the WebLogic Server JSP tags, see "JSP Tag Reference" in the BEA WebLogic Personalization Server documentation.

Form Field Specification

Other purposes of the shipping.jsp template are to collect information from the customer and to pass hidden information to the Webflow. The form fields used in the shipping.jsp template, and a description for each of these form fields, are listed in Table 4-4.

Table 4-4 shipping.jsp Form Fields

Parameter Name

Type

Description

"event"

Hidden

Indicates whether an event has been triggered. It is used by the Webflow to determine what happens next.

"origin"

Hidden

The name of the current page (shipping.jsp), used by the Webflow.

HttpRequestConstants.SHIPPING_METHOD

Radio button

Identifies the shipping method the customer selects.

HttpRequestConstants.SPECIAL_INSTRUCTIONS

Textbox

Any special instructions the customer specifies.

HttpRequestConstants.SPLITTING_PREFERENCE

Radio button

String representing the splitting preference the customer selects.

Note: Parameters that are literals in the JSP code are shown in quotes, while non-literals will require JSP scriptlet syntax (such as
<%= HttpRequestConstants.SPLITTING_PREFERENCE %>) for use in the JSP.

selectaddress.jsp Template

The selectaddress.jsp template (shown in Figure 4-2) displays a list of shipping addresses that have previously been associated with the customer. If the customer clicks the Use button associated with a particular address, that address will be used as the shipping address and the customer will continue to the next part of the checkout process.

If the customer wants to delete an address that is shown, the customer can click the Delete button associated with that address. To add a new shipping address, the customer can click the Add Address button. To go back to the previous page, the customer can click the Back button instead.

Sample Browser View

Figure 4-2 shows an annotated version of the selectaddress.jsp template. The dashed lines and numbers in the diagram are not part of the template; they are referenced in the explanation that follows the screen shot.

Figure 4-2 Annotated selectaddress.jsp Template


The numbers in the following list refer to the numbered regions in the figure:

  1. The header (top banner) for inner pages is created from an import of the innerheader.jsp template. This is standard across many of the second-level JSP templates provided by WebLogic Commerce Server. The import call is:

    <%@ include file="/commerce/includes/innerheader.jsp" %>

  2. This region contains dynamically displayed data of the customer's saved shipping addresses. This is accomplished using a combination of WebLogic Server and WebLogic Personalization Server JSP tags that obtain and display the addresses. Posts to the form can indicate use of a listed address or deletion of a listed address.

    Note: The customer can also initiate entry of a new shipping address from the selectaddress.jsp template. For more information about the addaddress.jsp template, see addaddress.jsp Template.

  3. The selectaddress.jsp template's content in region 3 contains the included innerfooter.jsp template. The include call in selectaddress.jsp is:

    <%@ include file="/commerce/includes/innerfooter.jsp" %>

    innerfooter.jsp consists of the horizontal footer at the bottom of the page, plus the right-side vertical column that describes (for the benefit of you and your development team) the name of the current template and links to its About information. In the innerfooter.jsp file, the right-side vertical column is an include file:

    <%@ include file="/commerce/includes/innerrightside.jsp" %> 

Location in the WebLogic Commerce Server Directory Structure

You can find the selectaddress.jsp template file at the following location, where WL_COMMERCE_HOME is the directory in which you installed WebLogic Commerce Server:

%WL_COMMERCE_HOME%\server\webapps\wlcs\commerce\order\
selectaddress.jsp
(Windows)
$WL_COMMERCE_HOME/server/webapps/wlcs/commerce/order/
selectaddress.jsp
(UNIX)

Tag Library Imports

The selectaddress.jsp template uses existing WebLogic Server and the WebLogic Personalization Server's User Management and Personalization JSP tags. It also uses Pipeline JSP tags. Therefore, the template includes the following JSP tag libraries:

<%@ taglib uri="weblogic.tld" prefix="wl" %>
<%@ taglib uri="pipeline.tld" prefix="pipeline"%>
<%@ taglib uri="um.tld" prefix="um" %>
<%@ taglib uri="es.tld" prefix="es"%>

Note: For more information on the WebLogic Server JSP tags or the WebLogic Personalization Server JSP tags, see "JSP Tag Reference" in the BEA WebLogic Personalization Server documentation. For more information about the Pipeline JSP tags, see BEA WebLogic Commerce Server Webflow and Pipeline Management.

These files reside in the following directory for the WebLogic Commerce Server Web application:

%WL_COMMERCE_HOME%\server\webapps\wlcs\WEB-INF (Windows)
$WL_COMMERCE_HOME/server/webapps/wlcs/WEB-INF (UNIX)

Java Package Imports

The selectaddress.jsp template uses Java classes in the following packages and therefore includes these import statements:

<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="com.beasys.commerce.foundation.pipeline*" %>
<%@ page import="com.beasys.commerce.axiom.contact.*" %>
<%@ page import="com.beasys.commerce.ebusiness.shipping.*" %>
<%@ page import="com.beasys.commerce.ebusiness.customer.*" %>
<%@ page import="com.beasys.commerce.webflow.*" %>

Location in Default Webflow

The page prior to the selectaddress.jsp template in the default Webflow is either the shipping details page (shipping.jsp) or the page where the customer enters a new shipping address (addaddress.jsp).

If the customer deletes an existing shipping address, the selectaddress.jsp is reloaded after the appropriate input processor and/or Pipeline has executed. If the customer is satisfied with selecting an address from the list of choices, they proceed to the payment information page (payment.jsp).

Note: For more information about the default Webflow, see Overview of the Order Processing Package.

Included JSP Templates

The following JSP templates are included in the selectaddress.jsp template:

Events

The selectaddress.jsp template presents a customer with several buttons, each of which is considered an event. These events trigger a particular response in the default Webflow that allows customers to continue. While this response can be to load another JSP, it is usually the case that an input processor or Pipeline is invoked first. Table 4-5 provides information about these events and the business logic they invoke.

Table 4-5 selectaddress.jsp Events

Event

Web Flow Response(s)

button(back)

No business logic required. Loads shipping.jsp.

button(addNewShippingAddress)


No business logic required. Loads addaddress.jsp.

button(deleteShippingAddress)

UpdateAddressKeyIP

DeleteShippingAddress

button(useShippingAddress)

UpdateShippingAddressIP

TaxVerifyShippingAddress

CalculateShippingCost

TaxCalculateLineLevel

Table 4-6 briefly describes each of the Pipelines from Table 4-5, as they are defined in the pipeline.properties file. For more information about individual Pipeline components, see Pipeline Components.

Table 4-6 Select Shipping Address Pipelines

Pipeline

Description

TaxVerifyShippingAddress

Contains TaxVerifyShippingAddressPC and is not transactional.

CalculateShippingCost

Contains CalculateShippingCostPC and is not transactional.

TaxCalculateLineLevel

Contains TaxCalculateLineLevelPC and is not transactional.

DeleteShippingAddress

Contains DeleteShippingAddressPC and is not transactional.

Dynamic Data Display

One purpose of the selectaddress.jsp template is to display the shipping addresses a customer previously entered. This is accomplished on selectaddress.jsp using two of the WebLogic Personalization Server's User Management JSP tags.

First, the getProfile JSP tag is used to set the customer profile (context) for which the shipping addresses should be retrieved, as shown in Listing 4-3.

Listing 4-3 Setting the Customer Context


<um:getProfile
profileKey="<%=request.getRemoteUser()%>
profileType="WLCS_Customer" />


Next, the getProperty JSP tag is used to retrieve a cached copy of the possible shipping addresses for the customer from the database, as shown in Listing 4-4.

Listing 4-4 Retrieving the ShippingAddressMap for the Customer


<um:getProperty propertyName="shippingAddressMap" id="shippingAddressMap" />


You can now iterate through the shipping addresses contained within the shippingAddressMap, as shown in Listing 4-5.

Listing 4-5 Iterating Through the Shipping Addresses


<% Iterator iterator=((Map)shippingAddressMap).keySet().iterator();
while(iterator.hasNext())
{
String addressKey=(String)iterator.next();
Address shippingAddress=(Address)((Map)shippingAddressMap).get(addressKey);
%>


Note: For more information on the WebLogic Personalization Server's JSP tags, see "JSP Tag Reference" in the BEA WebLogic Personalization Server documentation.

Lastly, the data contained within shippingAddress is accessed by using accessor methods/attributes within Java scriptlets. Table 4-7 provides more detailed information about these methods for Address.

Table 4-7 Address Accessor Methods/Attributes

Method/Attribute

Description

getStreet1()

The first line of the customer's street address.

getStreet2()

The second line of the customer's street address.

getCity()

The city in the customer's address.

getCounty()

The county in the customer's address.

getState()

The state in the customer's address.

getPostalCode()

The zip/postal code in the customer's address.

getCountry()

The country in the customer's address.

Listing 4-6 illustrates how these accessor methods/attributes are used within Java scriptlets.

Listing 4-6 Using Accessor Methods within selectaddress.jsp Java Scriptlets


<% Iterator iterator =((Map)shippingAddressMap).keySet().iterator();
while(iterator.hasNext())

{

String addressKey = (String)iterator.next();
Address shippingAddress = (Address)((Map)shippingAddressMap).get(addressKey);

%>

<table width="90%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td align="left" valign="top" width="40%" nowrap>
<p><%=shippingAddress.getStreet1()%><br>
<% if(shippingAddress.getStreet2().length() != 0) {%>
<%=shippingAddress.getStreet2()%><br>
<% } %>
<%=shippingAddress.getCity()%><br>
<%=shippingAddress.getState()%> <%=shippingAddress.getPostalCode()%><br>
<%= shippingAddress.getCountry() %>
</td>

    <td align="left" valign="top" width="5%" >
<div class="commentary">
<a href="<%=WebflowJSPHelper.createWebflowURL(pageContext,
"selectaddress.jsp", "button(deleteShippingAddress)","&" +
HttpRequestConstants.ADDRESS_KEY + "=" + addressKey, true)%>">
<img src="<%=com.beasys.commerce.webflow.WebflowJSPHelper.createGIFURL
(request, response,"/commerce/images/btn_delete.gif")%>" border="0">
</a>
</div>
</td>

    <td align="left" valign="top" width="5%" >
<div class="commentary">
<a href="<%=WebflowJSPHelper.createWebflowURL(pageContext,
"selectaddress.jsp", "button(useShippingAddress)","&" +
HttpRequestConstants.ADDRESS_KEY + "=" + addressKey, true)%>">
<img src="<%=com.beasys.commerce.webflow.WebflowJSPHelper.createGIFURL
(request, response,"/commerce/images/btn_use.gif")%>" border="0">
</a>
</div>
</td>
</tr>

  <tr>
<td colspan="3">
<hr size="1">
</td>
</tr>
</table>

<%

}

%>


Form Field Specification

The selectaddress.jsp template does not make use of any form fields.

addaddress.jsp Template

The addaddress.jsp template (shown in Figure 4-3) collects information about a new shipping address from the customer. This information includes two lines of a street address (one required), a city, a state, a zip code, and a country (all required).

When the customer clicks the Save button, the shipping address entered on this page is added to the list of addresses from which customers can select for this and future orders (selectaddress.jsp). Otherwise, the customer can click the Back button to return to the previous page.

Sample Browser View

Figure 4-3 shows an annotated version of the addaddress.jsp template. The dashed lines and numbers in the diagram are not part of the template; they are referenced in the explanation that follows the screen shot.

Figure 4-3 Annotated addaddress.jsp Template

The numbers in the following list refer to the numbered regions in the figure:

  1. The header (top banner) for inner pages is created from an import of the innerheader.jsp template. This is standard across many of the second-level JSP templates provided by WebLogic Commerce Server. The import call is:

    <%@ include file="/commerce/includes/innerheader.jsp" %>

  2. This region provides the customer with a series of form fields for entering a new shipping address. Required fields are indicated by an asterisk (*). This region utilizes the states.jsp and countries.jsp template files. The import calls in addaddress.jsp are:

    <%@ include file="/commerce/includes/states.jsp" %>
    <%@ include file="/commerce/includes/countries.jsp" %>

  3. The addaddress.jsp template's content in region 3 contains the included innerfooter.jsp template. The include call in addaddress.jsp is:

    <%@ include file="/commerce/includes/innerfooter.jsp" %>

    innerfooter.jsp consists of the horizontal footer at the bottom of the page, plus the right-side vertical column that describes (for the benefit of you and your development team) the name of the current template and links to its About information. In the innerfooter.jsp file, the right-side vertical column is an include file:

    <%@ include file="/commerce/includes/innerrightside.jsp" %> 

Location in the WebLogic Commerce Server Directory Structure

You can find the addaddress.jsp template file at the following location, where WL_COMMERCE_HOME is the directory in which you installed WebLogic Commerce Server:

%WL_COMMERCE_HOME%\server\webapps\wlcs\commerce\order\
addaddress.jsp
(Windows)
$WL_COMMERCE_HOME/server/webapps/wlcs/commerce/order/
addaddress.jsp
(UNIX)

Tag Library Imports

The addaddress.jsp template uses Webflow and Pipeline JSP tags. Therefore, the template includes the following JSP tag libraries:

<%@ taglib uri="pipeline.tld" prefix="pipeline"%>
<%@ taglib uri="webflow.tld" prefix="webflow" %>

Note: For more information on the Webflow and Pipeline JSP tags, see BEA WebLogic Commerce Server Webflow and Pipeline Management.

These files reside in the following directory for the WebLogic Commerce Server Web application:

%WL_COMMERCE_HOME%\server\webapps\wlcs\WEB-INF (Windows)
$WL_COMMERCE_HOME/server/webapps/wlcs/WEB-INF (UNIX)

Java Package Imports

The addaddress.jsp template uses Java classes in the following packages and therefore includes these import statements:

<%@ page import="javax.servlet.*" %>
<%@ page import="java.servlet.http.*" %>
<%@ page import="com.beasys.commerce.webflow.*" %>
<%@ page import="com.beasys.commerce.webflow.tags.*" %>
<%@ page import="com.beasys.commerce.foundation.pipeline*" %>
<%@ page import="com.beasys.commerce.axiom.contact.*" %>
<%@ page import="com.beasys.commerce.ebusiness.customer.*" %>

Location in Default Webflow

The addaddress.jsp template follows the page where the customer selects from a list of possible shipping addresses (selectaddress.jsp). Once the customer saves the new address, the customer is returned to the selectaddress.jsp template.

Note: For more information about the default Webflow, see Overview of the Order Processing Package.

Included JSP Templates

The following JSP templates are included in the addaddress.jsp template:

Events

The addaddress.jsp template presents a customer with two buttons, each of which is considered an event. These events trigger a particular response in the default Webflow that allows customers to continue. While this response can be to load another JSP, it is usually the case that an input processor or Pipeline is invoked first. Table 4-8 provides information about these events and the business logic they invoke.

Table 4-8 addaddress.jsp Events

Event

Webflow Response(s)

button(back)

No business logic required. Loads selectaddress.jsp.

button(addNewShippingAddress)

ValidateAddressIP

AddShippingAddress

Table 4-9 briefly describes each of the Pipelines from Table 4-8, as they are defined in the pipeline.properties file. For more information about individual Pipeline components, see Pipeline Components.

Table 4-9 Add Shipping Address Pipelines

Pipeline

Description

AddShippingAddress

Contains AddShippingAddressPC and is not transactional.

Dynamic Data Display

No dynamic data is presented on the addaddress.jsp template. However, the addaddress.jsp template does make use of code similar to that found in the newaddresstemplate.jsp template. Namely, it uses the same code to indicate when customers enter incorrect input or fail to provide information for a required field. For more information about the newaddresstemplate.jsp template, see "About the Included newaddresstemplate.jsp Template" in the BEA WebLogic Commerce Server Registration and User Processing Package documentation.

Form Field Specification

The purpose of the addaddress.jsp template is to allow customers to enter a new shipping address using various HTML form fields. It is also used to pass needed information to the Webflow.

The form fields used in the addaddress.jsp template, and a description for each of these form fields are listed in Table 4-10.

Table 4-10 addaddress.jsp Form Fields

Parameter Name

Type

Description

"event"

Hidden

Indicates which event has been triggered. It is used by the Webflow to determine what happens next.

"origin"

Hidden

The name of the current page (addaddress.jsp), used by the Webflow.

HttpRequestConstants.
CUSTOMER_SHIPPING_ADDRESS1

Textbox

The first line of the shipping street address.

HttpRequestConstants.
CUSTOMER_SHIPPING_ADDRESS2

Textbox

The second line of the shipping street address.

HttpRequestConstants.
CUSTOMER_SHIPPING_CITY

Textbox

The city in the shipping address.

HttpRequestConstants.
CUSTOMER_SHIPPING_STATE

Textbox

The state in the shipping address.

HttpRequestConstants.
CUSTOMER_SHIPPING_ZIPCODE

Textbox

The zip/postal code in the shipping address.

HttpRequestConstants.
CUSTOMER_SHIPPING_COUNTRY

Textbox

The country in the shipping address.

Note: Parameters that are literals in the JSP code are shown in quotes, while non-literals will require JSP scriptlet syntax (such as
<%= HttpRequestConstants.CUSTOMER_SHIPPING_CITY %>) for use in the JSP.

 


Input Processors

This section provides a brief description of each input processor associated with the Shipping Services JSP template(s).

InitShippingMethodListIP

Class Name

com.beasys.commerce.ebusiness.shipping.webflow.

InitShippingMethodListIP

Description

Obtains a list of all shipping methods from the database and populates the Pipeline session with a list of ShippingMethodValue objects. This list is cached, so this input processor does not continuously access the database. Accessing the list multiple times within one session has no additional effect.

Required HTTPServletRequest Parameters

None

Required Pipeline
Session Attributes

None

Updated Pipeline
Session Attributes

PipelineSessionConstants.SHIPPING_METHOD_LIST

Removed Pipeline
Session Attributes

None

Validation

None

Exceptions

ProcessingException, thrown if the input processor cannot read the shipping method information from the database.

UpdateShippingAddressIP

Class Name

com.beasys.commerce.ebusiness.shipping.webflow.

UpdateShippingAddressIP

Description

Updates the shipping address attribute in the Pipeline session based on the address the customer selects.

Required HTTPServletRequest Parameters

HTTPRequestConstants.ADDRESS_KEY

Required Pipeline
Session Attributes

None

Updated Pipeline
Session Attributes

PipelineSessionConstants.SHIPPING_ADDRESS

Removed Pipeline
Session Attributes

None

Validation

None

Exceptions

None

ValidateAddressIP

Class Name

com.beasys.commerce.ebusiness.shipping.webflow.

ValidateAddressIP

Description

Validates the address and places it in the Pipeline session.

Required HTTPServletRequest Parameters

HttpRequestConstants.CUSTOMER_SHIPPING_ADDRESS1

HttpRequestConstants.CUSTOMER_SHIPPING_ADDRESS2

HttpRequestConstants.CUSTOMER_SHIPPING_CITY

HttpRequestConstants.CUSTOMER_SHIPPING_STATE

HttpRequestConstants.CUSTOMER_SHIPPING_ZIPCODE

HttpRequestConstants.CUSTOMER_SHIPPING_COUNTRY

Required Pipeline
Session Attributes

None

Updated Pipeline
Session Attributes

PipelineSessionConstants.ADDRESS

Removed Pipeline
Session Attributes

None

Validation

Verifies that the required fields contain values.

Exceptions

ProcessingException, thrown if the required request parameters or required Pipeline session attributes are not available.

ValidateShippingInfoIP

Class Name

com.beasys.commerce.ebusiness.shipping.webflow.

ValidateShippingInfoIP

Description

Places the shipping method, splitting preference, and special instructions into the Pipeline session.

Required HTTPServletRequest Parameters

HttpRequestConstants.SHIPPING_METHOD

HttpRequestConstants.SPLITTING_PREFERENCE

HttpRequestConstants.SPECIAL_INSTRUCTIONS

Required Pipeline
Session Attributes

None

Updated Pipeline
Session Attributes

PipelineSessionConstants.SHIPPING_METHOD

PipelineSessionConstants.SPLITTING_PREFERENCE

PipelineSessionConstants.SPECIAL_INSTRUCTIONS

Removed Pipeline
Session Attributes

None

Validation

Verifies that the required fields contain values.

Exceptions

ProcessingException, thrown if the required request parameters or required Pipeline session attributes are not available.

 


Pipeline Components

This section provides a brief description of each Pipeline component associated with the Shipping Services JSP template(s).

Notes: For information about the TaxVerifyShippingAddressPC and TaxCalculateLineLevelPC Pipeline components, see Taxation Services.

Some Pipeline components extend other, base Pipeline components. For more information on the base classes, see the Javadoc.

AddShippingAddressPC

Class Name

com.beasys.commerce.ebusiness.shipping.pipeline.
AddShippingAddressPC

Description

Adds the address to the list of customer shipping addresses stored for the customer.

Required Pipeline
Session Attributes

PipelineSessionConstants.ADDRESS

PipelineSessionConstants.ADDRESS_KEY

Updated Pipeline
Session Attributes

None

Removed Pipeline
Session Attributes

None

Type

Java object

JNDI Name

None

Exceptions

PipelineFatalException, thrown when the Pipeline component cannot update the address information in the database.

CalculateShippingPC

Class Name

com.beasys.commerce.ebusiness.shipping.pipeline.
CalculateShippingPC

Description

Calculates the per-line cost of shipping for each line in the shopping cart. The implementation only uses a simple per-shipping method cost calculation. When integrating with a shipping provider, this Pipeline component should be rewritten to perform more specific cost calculations.

Required Pipeline
Session Attributes

PipelineSessionConstants.SHOPPING_CART

Updated Pipeline
Session Attributes

PipelineSessionConstants.SHOPPING_CART

Removed Pipeline
Session Attributes

None

Type

Java object

JNDI Name

None

Exceptions

PipelineFatalException, thrown if the required request parameters or required Pipeline session attributes are not available.

DeleteShippingAddressPC

Class Name

com.beasys.commerce.ebusiness.shipping.pipeline.
DeleteShippingAddressPC

Description

Uses the address key in the Pipeline session to locate the correct customer shipping address, then removes it from the list.

Required Pipeline
Session Attributes

PipelineSessionConstants.ADDRESS_KEY

Updated Pipeline
Session Attributes

None

Removed Pipeline
Session Attributes

None

Type

Java object

JNDI Name

None

Exceptions

PipelineFatalException, thrown when the Pipeline component cannot update the shipping address information in the database.