Chapter 7. Create a commerce enabled portal store 287
7.2 Create the ITSO B2B CEP store template
This section describes how we created the ITSO B2B CEP store template. The
workspace provided in the sg246890-code.zip contains the b2bCepWeb project
with these changes already completed.
7.2.1 Create a new project
Create a new project in WebSphere Studio Application Developer to import the
ITSO B2B CEP store assets. This will allow for modifications to the store assets
and repacking into an updated SAR file for publishing.
1. Start WebSphere Studio Application Developer and select the WebSphere
Commerce workspace.
2. Select the J2EE Navigator tab.
3. Open the Web perspective.
4. Select the J2EE Navigator tab, right-click in the white space and select New
-> Project -> Web -> Web Project.
5. When the Define the Web Project window appears, enter the following and
click Next:
– Project Name: b2bCepWeb
–Select J2EE Web Project
6. On the J2EE Settings page, enter the following and click Finish:
– Enterprise Application Project: select New
– New Project Name: b2bCepEAR
7. Import the ITSO B2B CEP store by doing the following:
a. Select the newly created project (for example, b2bCepWeb). Right-click
and then select Import -> File System.
c:\sg246890-code\debug ITSO-modified version of the
WebSphereCommerceBasePortlet.jar to include logon support
without single sign-on for debug purposes.
WCSLogon.properties file containing debug WCSPassword
and WCSLogonURL.
Note: This should only be used for debug and development, not
production use. This file is not supported by IBM WebSphere
Commerce.
Directory/Filename Description
288 WebSphere Commerce Portal V5.4 Solutions
b. Enter the root directory of the files (in our example,
c:\sg246890-code\wsad\cep\b2bCepWeb) and then click OK.
c. Click Select All and then click Finish.
d. When prompted with the message Classpath already exists, Would you
like to overwrite it?, we clicked No.
e. When prompted with the message Web settings already exists, Would
you like to overwrite it?, we clicked No.
7.2.2 Update core data
The core data that was modified to create the ITSO B2B CEP store includes the
following:
Modify store.xml
Modify the Distinguished Name (DN)
Modify store.xml
The core data that was updated for the ITSO B2B CEP store is located in the
store.xml file. We modified the storeent_id and the store directory.
What uniquely identifies a store is a combination of the store identifier and the
store owner. We modified the store identifier attribute to ensure that our store is
unique (see Example 7-1 for the storeent entry). For a complete listing, please
refer to the store.xml that is available in the downloaded ITSO sample
workspace, found in the b2bCepWeb\sar\data directory.
Example 7-1 XML element <storeent> in store.xml (identifier=b2bCep)
<storeent storeent_id="@storeent_id_1"
member_id="&MEMBER_ID;"
type="S"
identifier="b2bCep"
setccurr="USD"/>
Update the directory of the store (for example, directory=b2bCep as seen in
Example 7-2 on page 289).
Note: When creating a template, we recommend that you update the core
data files that contain information that will be common to all stores built from
the template.
Refer to the Store Developer’s Guide, IBM WebSphere Commerce V5.4 or the
WebSphere Commerce V5.4 online documentation for details on all core data
assets. In addition, refer to the WebSphere Commerce V5.4 Catalog Design
and Content Management, SG24-6585.
Chapter 7. Create a commerce enabled portal store 289
Example 7-2 XML element <store> in store.xml (directory=b2bCep)
<store store_id="@storeent_id_1"
directory="b2bCep"
ffmcenter_id="@ffmcenter_id_1" language_id="&en_US;" storegrp_id="-1"
allocationgoodfor="43200" bopmpadfactor="0" defaultbooffset="2592000"
ffmcselectionflags="0" maxbooffset="7776000" rejectedordexpiry="259200"
rtnffmctr_id="@ffmcenter_id_1" pricerefflags="0" storetype="B2B"/>
Modify the Distinguished Name (DN)
There are several data files included in the ITSO B2B CEP store SAR
(b2bCep_en_US_es_ES.sar) or the
WebSphereB2CCommerceEnabledPortal.sar included with the IBM Commerce
Enhancement Pack - April 2003 Edition, that require modifications for the
Distinguished Name, including contract.xml, businessaccount.xml, and
organization.xml.
The ITSO-provided WebSphere Studio Application Developer workspace
(c:\sg246890\wsad\cep) contains a contract.xml.LDAP,
businessacount.xml.LDAP, and organization.xml.LDAP file with the
Distinguished Name as needed for LDAP.
To address this problem, do the following:
1. Check the Distinguished Name (DN) for the wcsadmin user in the USERS
database table as follows:
a. Start a DB2 command window.
b. Connect to the WebSphere Commerce instance database.
db2 connect to wc1db
c. Query the USERs table.
db2 select * from USERS
d. Record the DN for wcsadmin (for example, uid=wcsadmin,dc=ibm,dc=com).
Note: You must edit all occurrences of the identifier and directory in the
SAR directory and language dependant sub directories. For example, the
en_US and es_ES must be updated, too.
Note: For more detailed information, reference Technote #1083258 at:
http://www-1.ibm.com/support/docview.wss?rs=494&context=SSZLC2&q=publish&
uid=swg21083258&loc=en_US&cs=utf-8&lang=en
Get WebSphere Commerce Portal V5.4 Solutions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.