Discussion:
Displaying Shipping Fees in during checkout (WSC V6 Pro)
(too old to reply)
a***@apsww.com
2006-11-25 18:39:22 UTC
Permalink
Hi,

We are trying to go live next week with our new WSC V6 Pro store. Our store is based on the Starter Store, and we are having trouble displaying the Shipping Fees to customers.

We would like to know what is the best and easiest method to display the calculated shipping fee for each of the Shipping Methods listed in the Shipping Method Selection Page during checkout.

Also, if a Free Shipping promotion code has been applied, the shipping fee of the affected Shipping Method should be displayed as $0.00 or FREE.

Please give our developers some guidance on which function or databean to get this information.


Thanks.


Andrew
m***@ca.ibm.com
2006-11-26 15:18:44 UTC
Permalink
you can try this page in the information center.

http://publib.boulder.ibm.com/infocenter/wchelp/v6r0m0/topic/com.ibm.commerce.user.doc/tasks/tshsetsp.htm

This tells you each step needed to set up shipping.
a***@apsww.com
2006-11-26 21:39:06 UTC
Permalink
Hi Frances,

Thanks for the reply, but I think you misunderstood me. Please see the attached screen shot. We need to display the Calculated Shipping Fees of each of the Shipping Methods.

We cannot just hard code the Shipping Fees into the Shipping Mode Description fields, because the shipping fees need to be calculated based on the Items in the order.

Our developers are having a hard time displaying the shipping fees, kindly provide us with some guidance on how to display the shipping fees. This is quite urgent or else, I won't be working today (Sunday) ... :)


Thanks in advance.

Andrew
m***@ca.ibm.com
2006-11-27 15:39:46 UTC
Permalink
I sent an urgent note to the developer, I will respond when he replies.
m***@ca.ibm.com
2006-11-28 12:21:39 UTC
Permalink
From the developer:

The databean OrderShippingModeListDataBean can be used to get the estimated shipping charge for each shipping mode.

This databean is mainly used to filter the shipping modes with no shipping charge, it can also get the shipping charge for each shipping method.

The OrderShippingModeListDataBean can only support shipping with one address and one shipping method for an order, cause it suppose all order items in the order are shipped to the same address using one shipping method, then try to calculate the shipping charge for each shipping method.

Steps to apply it:
1. Apply the latest OrderShippingModeListDataBean class. This data bean lists the shipping modes available to a given order. The following table shows the input parameters.

Name Description
order: The OrderDataBean

calculateShippingCharge: True if the shipping charges are to becalculated. (If no shipping charge can be resolved, this shipping method is filtered, the shipping mtehod with which shipping charge is Zero is allowed.)
Set the parameter to true.

resolveFulfillmentCenter: True if fulfillment center is to be resolved. (If no fulfillment center can be resolved for an item, there will be no shipping charge calculated for it.)Set the parameter to true.

2. Update the database to configure the calculation framework to throw an exception if the CalculationUsage does not calculate a value for the OrderItem.

UPDATE STENCALUSG SET USAGEFLAGS=3 WHERE STOREENT_ID IN (-1, storeId) AND CALUSAGE_ID=-2
Where:
storeId
The store ID of the target store.
Behavior
OrderShippingModeListDataBean retrieves shipping modes allowed by the contracts.
resolveFulfillmentCenter is set to true, OrderShippingModeListDataBean tries to allocate the fulfillment center. If any of the order items are not allocated, no shipping mode can be selected for this order.
Set calculateShippingCharge to be true, OrderShippingModeListDataBean tries to calculate the temp shipping charge for each shipping mode, as STENCALUSG.USAGEFLAGS is set to be 3, if any item's shipping charge is not calculated with a shipping mode, this shipping mode can not not be selected for this order.
For any shipping mode returned by the OrderShippingModeListDataBean, a shipping charge can be calculated.
3. Change the store flow to allow a single shipping address and a single shipping method.
a. Open WebSphere Commerce Accelerator.
b. Select Store > Change Flow.
c. Select Checkout.
d. Deselect the Allow multiple shipping addresses check box.
e. Select Single shipping methods.
f. Click Apply. This update can take some time.
The OrderShippingModeListDataBean can only support shipping with one address and one shipping method for an order.
4. Apply the OrderShippingModeListDataBean in the JSP file. For example, change the SingleShippingMethodDisplay.jsp file.
Customize the JSP file for selecting shipping mode as shown in the following code snippet:
<wcbase:useBean id="orderShippingModeList" classname="com.ibm.commerce.fulfillment.beans.OrderShippingModeListDataBean">
<c:set target="${orderShippingModeList}" property="order" value="${orderBean}"/>
<c:set target="${orderShippingModeList}" property="calculateShippingCharge" value="true"/>
<c:set target="${orderShippingModeList}" property="resolveFulfillmentCenter" value="true"/>
</wcbase:useBean>
//the orderShippingModeList contains all the filtered shipping modes
<table>
<tr>
<th>Shipping Mode</th>
<th>Shipping Charge</th>
</tr>
<c:forEach items="${orderShippingModeList.shippingModes}" var="shippingMode" varStatus="status">
<tr>
<td><c:out value="${shippingMode.description.description}"/></td>
<td><c:out value="${orderShippingModeList.shippingCharges[status.index]}"/></td>
</tr>
</c:forEach>
</table>

the url of this doc on the info center
http://ecdfp.torolab.ibm.com/darwyn/com.ibm.commerce.developer.doc/tasks/tshcustomizeshipping.htm

For the free shipping promotion, the current code doesn't support it, we will try to do some change to support this feature.
m***@ca.ibm.com
2006-11-28 12:23:30 UTC
Permalink
they also say:

One thing need to clarify: OrderShippingModeListDataBean can only be used for single shipping mode (this means all the orderitem in the order must have the same shipping mode) but it DOSE NOT require single shipping address in the order.

This data bean can list all the possible shipping modes for the order and give the estimated shipping charge for each shipping mode (based on the assumption that all the orderitems in this order adopt this shipping mode), but the shipping charge is the original/base shipping charge, not include shipping promotion and other shipping adjustments (like contract based shipping adjustment).

To get more exact estimated shipping charge (for example total shipping charge after shipping promotion), there is more work.

(They are going to send some code for your developer to work with)
a***@apsww.com
2006-11-28 13:13:05 UTC
Permalink
Hi Francis,

Thanks for your help. When they send the code, kindly either post it here or send to me by email.

I appreciate your assistance.


Thanks again.

Andrew
a***@apsww.com
2006-11-28 19:43:42 UTC
Permalink
Hi Francis,

Any chance that the sample code may be available today?


Thanks in advance.


Andrew
m***@ca.ibm.com
2006-11-28 19:59:54 UTC
Permalink
Hi,

The developers are in China so I probably won't get a response until sometime later on.

I know that they were going to work on the code to give you a good example.

If you could give me your e-mail address I can send them an update notice and copy you. That way you can find out the information when I do.

It might work faster that way :)
andrewaps
2006-11-28 20:22:06 UTC
Permalink
Hi Frances,

My email is in my profile. Just click on my username to see it. I try not to post it here so it won't get picked up by spammers.


Thanks for your help.

Andrew
m***@ca.ibm.com
2007-01-05 13:50:01 UTC
Permalink
This has been solved by APAR JR25517

Loading...