Technote

(FAQ)
Set up a free shipping promotion on a per-item basis
How do you set up a promotion to give free shipping on a per item basis? Shipping can be calculated on a per order basis, or on a per item basis.
Cause This type of promotion can not be configured using the default WebSphere Commerce Accelerator. It requires a custom promotion definition


Answer

Promotion definitions are stored in the database with the promotion you create. You can see the promotion definition in its XML format in the XMLPARAM column in the PX_PROMOTION database table.
A custom promotion definition can be constructed using a couple of default promotions as examples.
Using an example XML that applies a product discount (for example, buy X, get 25% off), and an XML example that applies a shipping discount, you can combine the two to create a new promotion.

Here are the two original promotion definitions created using the WebSphere Commerce Accelerator (formatted for easier review):

Free shipping on orders greater than $10

25% off the purchase of product-sku-nf-2_1_1, when you buy 2 or more.

You can create the new per item shipping promotion combining elements from both XML files.


(You can see what has changed by looking at the difference between freeshipping.xml and newshipping.xml)

Before this example can be loaded directly into your system, further update the XML to replace any store or instance specific parameters.
It is a good idea to create this customization using promotion XML files from the specific machine on which the promotion is needed.

To load your custom promotion, see the following technote:
Uploading the XML of a customized promotion into the WebSphere Commerce database.

More information on customizing the Promotion Engine can be found in the Information Center, specifically in the promotion customization sections:
http://publib.boulder.ibm.com/infocenter/wchelp/v5r6m1/index.jsp?topic=/com.ibm.commerce.customizetools.doc/concepts/cprpromcustintro.htm

The Information Center also has links that explain the make-up of the Promotion XML.

Example Promotion XML:
http://publib.boulder.ibm.com/infocenter/wchelp/v5r6m1/index.jsp?topic=/com.ibm.commerce.customizetools.doc/refs/rprsmppromxml.htm

Adjustment XML fragments:
http://publib.boulder.ibm.com/infocenter/wchelp/v5r6m1/index.jsp?topic=/com.ibm.commerce.customizetools.doc/concepts/cprpromcustintro.htm

Filter XML fragments:
http://publib.boulder.ibm.com/infocenter/wchelp/v5r6m1/index.jsp?topic=/com.ibm.commerce.customizetools.doc/refs/rprsmpfltxml.htm


Notes:

  1. The promotion above will work when shipping is calculated on a per item basis. When the shipping charge is calculated on a per order basis, the behavior is not well defined and can lead to unpredictable results (for example, shipping for 1 item =/= shipping for 2 items when 1 item has free shipping).

  2. If using WebSphere Commerce 5.6.1, please see the following technote for an additional fix which is required.
    Customized Free Shipping promotion on a Per-Item Basis has eradic behavior

Related information
Uploading the XML of a customized promotion
Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Enterprise Customization / Application Development AIX, i5/OS, Linux, Solaris, Windows 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Enterprise
Commerce WebSphere Commerce Business Edition Customization / Application Development AIX, i5/OS, Linux, Solaris, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 5.6.1.4 Business Edition
Commerce WebSphere Commerce - Express Customization / Application Development i5/OS, Linux, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 5.6.1.4, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Express
Commerce WebSphere Commerce Developer Enterprise Customization / Application Development Windows 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Enterprise
Commerce WebSphere Commerce Developer Business Edition Customization / Application Development Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 5.6.1.4 Developer Business Edition
Commerce WebSphere Commerce Developer Professional Edition Customization / Application Development Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4, 5.6.1.4 Developer Professional Edition
Commerce WebSphere Commerce Developer Express Customization / Application Development Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 5.6.1.4, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Developer Express
   

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21232941