- Promotion module
- Enable the following runtime trace string in WAS console:
com.ibm.websphere.commerce.WC_ORDER=all: com.ibm.websphere.commerce.WC_CALCULATION=all: com.ibm.commerce.marketing.promotion.*=all: com.ibm.commerce.promotion.*=all
com.ibm.websphere.commerce.WC_ORDER=all: com.ibm.websphere.commerce.WC_CALCULATION=all: com.ibm.commerce.marketing.promotion.*=all: com.ibm.commerce.promotion.*=all
Study Guide
[Exam notes]
[Exam notes]
When you enable this feature... | These dependent features are automatically enabled |
location-services |
|
store-enhancements | Important!
|
content-version |
|
management-center |
|
foundation |
enableFeature.xml
for management-center feature runs successfully in the runtime environment, you see a BUILD SUCCESSFUL message in the command window where you ran the enablement script and a BUILD SUCCESSFUL message in enablemanagement-center_timestamp.log
.enableFeature.bat
for management-center feature runs successfully in the development toolkit, you see an enableFeature.bat
completed message in the command window where you ran the script. For enablement details, refer to log file: enableFeature.log
+++ Warning +++: Tue Mar 10 15:45:50 EDT 2009
java.lang.NoClassDefFoundError:
com.ibm.commerce.catalog.facade.CatalogFacade
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:258)
Attribute value cannot be migrated ${parent.width} in file D:\IBM\WCDE_P~1\components\management-center\backup\LOBToolsCustom\WebContent\WEB-INF\src\lzx\commerce\shell\ApplicationMenuItems.lzx
Attribute value cannot be migrated ${this.getPromptText(this.parent.parent.promptText)} in file D:\IBM\WCDE_P~1\components\management-center\backup\LOBToolsCustom\WebContent\WEB-INF\src\lzx\commerce\promotion\restricted\objectDefinitions\BasicCodePatternBuilder.lzx
Attribute value cannot be migrated ${parent.assetGroup.visible} in file D:\IBM\WCDE_P~1\components\management-center\backup\LOBToolsCustom\WebContent\WEB-INF\src\lzx\commerce\marketing\propertiesViews\WebActivityBuilder.lzx
CWUPI0010E: Cannot uninstall an installed maintenance package. No corresponding
maintenance backup package is available in the product maintenance backup directory.
Solution: Remove all software, such as the WebSphere Commerce Feature Packs, that is dependent on the fix pack.
updatedb.bat
. Ensure that you have a backup of the database.
updatelog.txt
loadBootstrapData:
Massloading C:\IBM\WCDE_E~1\components\foundation\xml\wcs.bootstrap_foundation.xml
-dbname BEAERO -dbuser db2admin -dbpwd ****** -infile C:\IBM\WCDE_E~1\components\foundation\xml\wcs.bootstrap_foundation.xml -method sqlimport -commitcount 1000 -maxerror 1 -customizer -schemaname DB2ADMIN
Error in MassLoading, please check logs for details.
BUILD FAILED
C:\IBM\WCDE_E~1\components\common\xml\enableFeatureForToolkit.xml:52: The following error occurred while executing this line:
C:\IBM\WCDE_E~1\components\common\xml\enableFeatureForToolkit.xml:122: The following error occurred while executing this line:
C:\IBM\WCDE_E~1\components\common\xml\databaseTasks.xml:22: The following error occurred while executing this line:
C:\IBM\WCDE_E~1\components\common\xml\databaseTasks.xml:105: Error in massloading
When you look in wcs.bootstrap_foundation.error.xml
, you see an error message similar to the following:
<?xml version="1.0" encoding="UTF-8"?>
<import>
<error id="SAXException" locus="com.ibm.wca.MassLoader.Parser.DefaultParser">
<message>Element type "keys" must be declared. </message>
</error>
</import>
You can find a similar message in messages.txt
:
> 2011-00-00 00:00:00.000, <Thread-6>, com.ibm.wca.MassLoader.Parser.ParserHandler::error, S1
Error Element type "keys" must be declared. : 19 : 162
Solution: wcs.dtd
is corrupted. Replace the file with a copy of the file from a working environment on the same WebSphere Commerce Version 7 feature pack level.
NIFStack.xml
.
WCDE_installdir/properties/version/feature_name.toolkit.70.component
file exists for every feature that is enabled, for example, management-center.toolkit.70.component
.
[Exam notes]
store-refs.xml
file defines the Publish wizard publish parameters (such as, store directory, store identifier).ibm-wc-load.xml
file determines what tasks will be completed during the publish process and the sequence of these tasks. You may add new tasks to ibm-wc-load.xml
, but any new task must extend com.ibm.commerce.tools.devtools.publish.tasks.DeployTaskCmd
.store-data-asset.xml
file includes placeholders for all the data assets that will be consolidated during publish.ForeignKeys.dtd
and keys.dtd
[Exam notes]
[Exam notes]
wcbd-build.private.properties.template
is the template for the configuration properties file that contains security-sensitive information of the build process (for example, passwords). Properties in this file are encoded by the build process.dist/server
directory contains the server deployment packages that are generated by the build process.dist/toolkit
directory contains the toolkit deployment packages that are generated by the build process.[Exam notes]
Problem scenario:
Problem scenario:
Important! Problem scenario:
wc-resource-containers.xml
<wc:DefaultConfiguration
lockingPolicy="Workspaces_locking_policy"
enableDynamicWorkspaceCreation="false"
readPrefixName="WCR"
writePrefixName="WCW"
/>
Workspaces_locking_policy
with one of the policy classes shown below -
com.ibm.commerce.context.content.locking.WorkspaceLockingPolicy
com.ibm.commerce.context.content.locking.TaskGroupLockingPolicy
com.ibm.commerce.context.content.locking.TaskLockingPolicy
com.ibm.commerce.context.content.locking.NoLockingPolicy
RejectTaskNotification
ReadyToApproveTaskGroupNotification
ActivateTaskNotification
wc-workspace.xml
-
<ActivateTaskEmail isEmailEnabled="true" from="" cc="" bcc="" language="en_US" />
<RejectTaskEmail isEmailEnabled="true" from="" cc="" bcc="" language="en_US" />
<ApproveTaskGroupEmail isEmailEnabled="true" from="" cc="" bcc="" language="en_US" />
[Exam notes]
<_config:DataloadBusinessObjectConfiguration>
<_config:DataLoader className="com.ibm.commerce.foundation.dataload.BusinessObjectLoader" >
<_config:DataReader className="com.ibm.commerce.foundation.dataload.datareader.CSVReader" firstLineIsHeader="true" useHeaderAsColumnName="true" >
<_config:property name="keyColumns" value="PartNumber" />
</_config:DataReader>
<_config:BusinessObjectBuilder className="com.ibm.commerce.foundation.dataload.businessobjectbuilder.BaseBusinessObjectBuilder"
packageName="com.ibm.commerce.catalog.facade.datatypes.CatalogPackage" dataObjectType="CatalogEntryType" >
<_config:DataMapping>
<_config:mapping xpath="CatalogEntryIdentifier/ExternalIdentifier/PartNumber" value="PartNumber" />
<_config:mapping xpath="catalogEntryTypeCode" value="Type" />
<_config:mapping xpath="ParentCatalogEntryIdentifier/ExternalIdentifier/PartNumber" value="ParentPartNumber" />
<_config:mapping xpath="displaySequence" value="Sequence" />
<_config:mapping xpath="Description[0]/Name" value="Name" />
<_config:mapping xpath="Description[0]/ShortDescription" value="ShortDescription" />
</_config:DataMapping>
<_config:BusinessObjectMediator className="com.ibm.commerce.catalog.dataload.mediator.CatalogEntryMediator"
componentId="com.ibm.commerce.catalog" >
</_config:BusinessObjectMediator>
</_config:BusinessObjectBuilder>
<_config:BusinessObjectBuilder className="com.ibm.commerce.foundation.dataload.businessobjectbuilder.TableObjectBuilder" >
<_config:Table name="XWARRANTY">
<_config:Column name="CATENTRY_ID" value="catentry_Id" valueFrom="IDResolve"
<_config:IDResolve tableName="CATENTRY" generateNewKey="false" >
<_config:UniqueIndexColumn name="PARTNUMBER" value="PartNumber" />
<_config:UniqueIndexColumn name="MEMBER_ID" value="storeOwnerId" valueFrom="BusinessContext" />
</_config:IDResolve>
</_config:Column>
<_config:Column name="WARTERM" value="WarrantyTerm" />
<_config:Column name="WARTYPE" value="WarrantyType" />
</_config:Table>
<_config:Table name="XCAREINSTRUCTION">
<_config:Column name="CATENTRY_ID" value="catentry_Id" valueFrom="IDResolve" />
<_config:Column name="LANGUAGE_ID" value="langId" valueFrom="BusinessContext" />
<_config:Column name="CAREINSTRUCTION" value="CareInstruction" />
</_config:Table>
<_config:BusinessObjectMediator className="com.ibm.commerce.foundation.dataload.businessobjectmediator.TableObjectMediator" >
</_config:BusinessObjectMediator>
</_config:BusinessObjectBuilder>
</_config:DataLoader>
</_config:DataloadBusinessObjectConfiguration>
<_config:DataLoadEnvConfiguration>
<_config:BusinessContext storeIdentifier="Aurora" catalogIdentifier="AuroraCatalog" languageId="-1" currency="USD">
</_config:BusinessContext>
<_config:Database type="derby" name="..\db\mydb" schema="mydbschema"/>
<_config:IDResolver className="com.ibm.commerce.foundation.dataload.idresolve.IDResolverImpl" cacheSize="10000000"/>
<_config:DataWriter className="com.ibm.commerce.foundation.dataload.datawriter.JDBCDataWriter" />
</_config:DataLoadEnvConfiguration>
<_config:DataLoadConfiguration>
<_config:DataLoadEnvironment configFile="wc-dataload-env.xml" />
<_config:LoadOrder >
<_config:LoadItem commitCount="1" batchSize="1" dataLoadMode="Replace" name="Warranty" businessObjectConfigFile="wc-warrantytableobject-loader.xml">
<_config:DataSourceLocation location="WarrantyTableLoad.csv"/>
</_config:LoadItem>
</_config:LoadOrder>
</_config:DataLoadConfiguration>
commitCount
is N = 10 and an error occurs in line 25:
dataLoadMode
can be set to either Insert
, Replace
(Default), or Delete
.
<_config:BusinessObjectMediator>
element with startKey
and endKey
. If there is a flag in the input data to indicate that this object is to be deleted, the flag is ignored. This mode is recommended for initial loading of data to improve performance.
Problem scenario: A CSV file contains a line that creates a product and a product description. If the file also contains a second line that loads the same product with a description in a different language, the load process fails. Since the utility creates the product and description in the first line, when the utility encounters the second line, the utility attempts to create the product again. Since the product exists, the load fails. To load this product and description data, you can use one of the following methods:
Limitation: If your site uses WebSphere Commerce search, the delta search index might not rebuild correctly when you delete some catalog objects with the Data Load utility in delete mode. When you delete a child object of a catalog entry or category with the utility in delete mode, both the child and parent object are removed from the delta search index rebuild. This removal can cause the parent catalog entry or category to no longer be indexed or display correctly in the storefront.
Use the utility in replace mode to delete catalog objects when your site uses WebSphere Commerce search. To delete objects with the utility in replace mode, include the value 1 for the Delete column of an object in your input file. If you do decide to delete catalog objects with the utility in delete mode, run a full index rebuild after the load operation completes.
dataLoadMode="Replace
, commitCount="1"
, batchSize="1"
startKey
and endKey
IDResolver cacheSize="0"
if your database is largeTableObjectMediator
, or you can create your own custom business object mediators.
TableObjectMediator
does not support workspace locking.Problem scenario:
Solution: Enable data cache invalidation.
<_config:BusinessObjectMediator className="com.ibm.commerce.price.dataload.mediator.OfferMediator" componentId="com.ibm.commerce.price">
<_config:property name="DataCacheInvalidationEnabled" value="true" />
</_config:BusinessObjectMediator>
[Exam notes]
eluminate.js
library file version does not end with the letter H
, and/orcmcustom.js
file.biConfig.xml
file for IBM Digital Analytics
<BIConfiguration>
<ssoKey></ssoKey>
<biproviders>
<biprovider name="coremetrics">
<header>
<![CDATA[<script type="text/JavaScript">
<!--
]]>
</header>
<footer>
<![CDATA[
//-->
</script>]]>
</footer>
</biprovider>
</biproviders>
<stores>
<store storeId="10101"
biprovider="coremetrics" enabled="true" debug="true"
marketingCenterEnabled="true"
useHostedCMHLibraries="true" useEmailForCustomerId="false"
segmentExportMode="append" >
<useCookies>true</useCookies>
<clientid>69999999</clientid>
<url>https://welcome.coremetrics.com/analyticswebapp/analytics.jsp</url>
<marketingCenterUrl>https://mc.coremetrics.com/mcwebapp/welcome.do</marketingCenterUrl>
<output section="header">
<![CDATA[
<script type="text/javascript" src="//libs.coremetrics.com/eluminate.js"></script>
<script type="text/javascript">
cmSetupNormalization("krypto-_-krypto");
// send data to production system
//cmSetClientID("99999999",true,"data.coremetrics.com","thesite.com");
// send data to test system
cmSetClientID("69999999",false,"testdata.coremetrics.com","thesite.com");
</script>
]]>
</output>
</store>
</stores>
</BIConfiguration>
ssoKey
identifies a secret key for single sign-on to the analytics provider from Management Center. url
element identifies the URL for launching the analytics provider from Management Center.useHostedCMHLibraries="true"
indicates the store is using the standard IBM Digital Analytics library. useHostedCMHLibraries="false"
indicates the store is using the custom IBM Digital Analytics library.marketingCenterEnabled
is the enablement flag for integrating Management Center with IBM Marketing Center. If Management Center is integrated with IBM Marketing Center, marketingCenterUrl
element can be used to override the default URL to IBM Marketing Center.[Exam notes]
STGSITETAB
.STGMERTAB
.STGSITETAB
, STGMERTAB
, and STGMRSTTAB
.TABNBR
column value for the child tables are higher than the TABNBR
column value for the parent tables. If your customized table is a parent table of a WebSphere Commerce table, ensure that the TABNBR
column value for the customized table is lower than the TABNBR
column value for the WebSphere Commerce table.STAGLOG
table.BIGINT
).STAGLOG
database table.ON DELETE CASCADE
.stagingprop
utility is run without consolidationSize
parameter, the default behavior of stagingprop is to perform the consolidation phase for all unprocessed records in the STAGLOG
table at once.
Consider the scenario where the value specified for consolidationSize
is x
and the total number of unprocessed records in the STAGLOG
table is y
:
x >= y
, stagingprop's consolidation phase behavior remains the same as the default behavior.A
, whose total number of unprocessed records in the STAGLOG
table is z
:
z <= x
, A
's entire set of unprocessed records in the STAGLOG
table is fetched once.z > x
, A
's unprocessed records in the STAGLOG
table is retrieved in (1 + floor(z/x))
number of fetches.
UPDATE mbrgrpusg SET FIELD1=? WHERE mbrgrp_id=? AND mbrgrptype_id=? SELECT FIELD1 FROM mbrgrpusg WHERE mbrgrp_id=? AND mbrgrptype_id=? begin to propagate table mbrgrpusg
STAGLOG
records that show either the unique index or primary keys of a table that is referenced in the stagingprop log is being modified as a part of an UPDATE action.STAGLOG
records with STGPROCESSED=1
.[Exam notes]
SystemOut.log
, for example -
The trace state has changed. The new trace state is *=info:com.ibm.websphere.commerce.WC_ORDER=all:com.mycompany.orders=all.
package com.mycompany.commerce; import java.util.logging.Level; import java.util.logging.Logger; import com.ibm.commerce.foundation.common.util.logging.LoggingHelper; public class ExtGetContractUnitPriceCmdImpl extends GetContractUnitPriceCmdImpl { private static final String CLASS_NAME = ExtGetContractUnitPriceCmdImpl.class.getName(); private static final Logger LOGGER = LoggingHelper.getLogger(ExtGetContractUnitPriceCmdImpl.class); public void performExecute() throws ECException { final String methodName = "performExecute"; if (LoggingHelper.isEntryExitTraceEnabled(LOGGER)) LOGGER.entering(CLASSNAME, methodName); try { super.performExecute(); boolean a = someOtherFuntion(); if (LOGGER.isLoggable(Level.FINE)) LOGGER.logp(Level.FINE, CLASS_NAME, methodName, "someOtherFunction returned " + a); } catch (Exception e) { LOGGER.logp(Level.SEVERE, CLASS_NAME, methodName, e.getClass().getName() + "Your Logging Message", e); } if (LoggingHelper.isEntryExitTraceEnabled(LOGGER)) LOGGER.exiting(CLASSNAME, methodName); } }
stopServer.log
, SystemErr.log
, SystemOut.log
, trace.log
WCDE_installdir/wasprofile/logs/server1
SystemOut.log
and SystemErr.log
should be checked after starting an application server to confirm that the applications inside the application server being started have also started successfully.com.ibm.websphere.commerce.WC_ORDER
com.ibm.commerce.marketing.promotion
com.ibm.commerce.promotion.facade.server
com.ibm.commerce.marketing.promotion
Level | SystemOut.log | SystemErr.log | trace.log |
SEVERE | YES | NO | YES |
WARNING | YES | NO | YES |
INFO | YES | NO | YES |
CONFIG | YES | NO | YES |
FINE | NO | NO | YES |
FINER | NO | NO | YES |
FINEST | NO | NO | YES |
INFO
(usually enabled by default), messages that use SEVERE
and WARNING
are also logged.[Exam notes]
sendImmediate()
sendTransacted()
MSGSTORE
table and lets the scheduler batch job send the messages at predetermined time intervals. The advantage of doing this is to avoid sending the message if the caller of this command encounters exception after calling this command. The caller is not blocked.
sendReceiveImmediate()
byte[] getResult()
method returns the result of a send-and-receive sending operation, and should be called AFTER the execute for the command is called.
com.ibm.commerce.messaging.commands.SendMsgCmd sendMsgCmd =
(com.ibm.commerce.messaging.commands.SendMsgCmd) CommandFactory.createCommand(SendMsgCmd.NAME, getStoreId());
//To use the site-level configuration, set store id to "0".
sendMsgCmd.setStoreID(getStoreId());
sendMsgCmd.setMsgType("OrderReceived");
String orderNotifyMsg = new String("...");
//The first parameter is null, this means the default transport method associated with this message type will be used.
//sendMsgCmd.setContent(null, getCommandContext().getLanguageId().toString() , orderNotifyMsg.getBytes());
TypedProperty typedProperty = new TypedProperty();
typedProperty.put("ORDER_REF_NUMBER", getOrderRn().toString());
typedProperty.put("LANGUAGE_ID", getCommandContext().getLanguageId());
//The first parameter is null, this means the default view name associated with this message type in MSGTYPES table will be used.
//Another view name may be specified to override the default.
//If view can not be found under the store id in command context object, the messaging system will attempt to look up the view with store id of "0".
sendMsgCmd.compose(null, getCommandContext(), typedProperty);
sendMsgCmd.setConfigData("subject","Your Order has been received");
sendMsgCmd.setConfigData("recipient","recipient@recipient.com");
sendMsgCmd.setConfigData("sender","storeAdmin@storeABC.com");
sendMsgCmd.sendTransacted();
sendMsgCmd.setCommandContext(getCommandContext());
sendMsgCmd.execute();
SendMsgCmd.setContent
and SendMsgCmd.compose
are used:
SendMsgCmd.setContent
is called with the languageId parameter, its generated content is overridden when SendMsgCmd.compose
is called.SendMsgCmd.setContent
is called without the languageId parameter, its generated content is not overridden when SendMsgCmd.compose
is called.<forward className="com.ibm.commerce.struts.ECActionForward" name="ActivateTaskNotificationView/0/-3" path="/ActivateTaskNotification.jsp">
<set-property property="direct" value="true"/>
<set-property property="properties" value="storeDir=no"/>
<set-property property="resourceClassName" value="com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl"/>
<set-property property="interfaceName" value="com.ibm.commerce.messaging.viewcommands.MessagingViewCommand"/>
<set-property property="implClassName" value="com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl"/>
</forward>
wc-server.xml
).user_template.xml
is an XML message template definition file that allows you to add new inbound XML messages to be supported by your system.[Exam notes]
com.ibm.commerce.security.Protectable
interface. As such, the bean must provide an implementation of the getOwner()
and fulfills(Long member, String relationship)
methods.com.ibm.commerce.security.Delegator
interface. In order to be directly protected, the getDelegate
method should return the data bean itself. In order to be indirectly protected, the data bean returned by the getDelegate
method must implement the Protectable
interface.A bypass of the access control checks occurs in the following cases:
populate()
method directly. <Policies>
<Action Name="ProductDisplayView" CommandName="ProductDisplayView"/>
<ActionGroup Name="AllSiteUsersViews" OwnerID="RootOrganization">
<ActionGroupAction Name="ProductDisplayView"/>
</ActionGroup>
</Policies>
WC_ACCESSCONT PolicyManagerImpl.getParentOrganizationsForResource
Error: No parent organizations; defaulting to Root Organization.
MBRREL table or Dynacache may be in invalid state.
WC_ACCESSCONT PolicyManagerImpl.isAllowed isAllowed?
User=100000000517; Action=Execute;
Resource=com.ibm.commerce.scheduler.commands.ListRegistryCmdImpl;
Owner=555; Resource Ancestor Orgs=-2001; Resource
Applicable Orgs=-2001
Solution: Given the preceding error message that member 555 does not have a parent organization, the MBRREL
table should be populated, to specify its ancestors. If its parent organization is 2002, and its grandparent organization is Root Organization, the MBRREL
table should be populated as shown below -
descendant_id | ancestor_id | sequence |
555 | 2002 | 1 |
555 | -2001 | 2 |
[Exam notes]
To define a controller command or service to be available for AJAX type requests, define a struts-action entry in the struts-config XML file that identifies the controller command or service as an AJAX type of action.
Commands:
<action
parameter="com.ibm.commerce.interestitems.commands.InterestItemAddCmd"
path="/AjaxInterestItemAdd"
type="com.ibm.commerce.struts.AjaxAction">
<set-property property="authenticate" value="0:0"/>
<set-property property="https" value="0:1"/>
</action>
Services:
<action
parameter="order.addOrderItem"
path="/AjaxOrderChangeServiceItemAdd" type="com.ibm.commerce.struts.AjaxComponentServiceAction">
<set-property property="authenticate" value="0:0"/>
<set-property property="https" value="0:1"/>
</action>
The characteristics of an AjaxAction
type URL is that after the execution of the command or service, the WebSphere Commerce runtime automatically forwards the request to one of two well known views to compose a JSON object containing all the entries in the response back to the client. The two well known views map to AjaxActionResponse.jsp
(success case) and AjaxActionErrorResponse.jsp
(failure case).
Important! wc.service
should be declared beforehand if you want to handle the response JSON in a page. The wc.service.declare
API declares a JavaScript service object that is able to call WebSphere Commerce AJAX type struts-actions.
wc.service.declare({
id: "AjaxInterestItemAdd",
actionId: " AjaxInterestItemAdd",
url: " AjaxInterestItemAdd",
formId: "",
successHandler: function(serviceResponse) {
alert("success");
},
failureHandler: function(serviceResponse) {
if (serviceResponse.errorMessage) {
alert(serviceResponse.errorMessage);
}
}
});
To invoke the AJAX call, the following API is used:
wc.service.invoke("AjaxInterestItemAdd");
The successHandler
function defined in the service declaration is executed and two model changed Dojo events (modelChanged
and modelChanged/actionId
) are published automatically by the framework when the request completes successfully, and Dojo automatically notifies all subscribed listeners.
Any HTML element of a page can be designated as a refresh area. The content within the HTML tag will be replaced by new content from the WebSphere Commerce server whenever the refresh controller associated with the refresh area triggers the refresh request.
<div dojoType="wc.widget.RefreshArea"
id="MiniShoppingCart"
widgetId="MiniShoppingCart"
controllerId="MiniShoppingCartController">
</div>
A refresh area always has a refresh controller associated with it. The refresh controllers are automatically registered to listen to modelChanged
and renderContextChanged
events. Therefore, they will be notified when these events occur. They then evaluate the model changes and/or render context changes and decide if the refresh areas that it manages should be refreshed or not.
wc.render.declareRefreshController({
id: "MiniShoppingCartController",
renderContext: wc.render.getContextById("MiniShoppingCartContext"),
url: "MiniShoppingCartView",
formId: "",
modelChangedHandler: function(message, widget) {
if(message.actionId in order_updated){
widget.refresh();
}
},
renderContextChangedHandler: function(message, widget) {
},
postRefreshHandler: function(widget) {
}
});
The modelChangedHandler
function is executed by the WebSphere Commerce AJAX framework as soon as there is a model changed event triggered by successful wc.service.invoke()
actions. It first checks that the model changed is for an actionId
that is of interest to the refresh area. The widget.refresh()
is the code that makes an AJAX call to the WebSphere Commerce server for the URL specified in the refresh controller. Once the new HTML fragment returns from the server, the framework destroys anything that exists in the current refresh area and replaces its contents with the new HTML fragment returned by the view.
The postRefreshHandler
function is the last function that the framework calls after a refresh area is successfully refreshed with new contents. It can be used to unblock the user interface if it was blocked during the AJAX calls.
The dojo.xhrPost
API is used in conjunction with the traditional WebSphere Commerce runtime programming model, where a request is made to a controller command or a service, and after execution, the WebSphere Commerce runtime redirects the request to whatever is specified in the URL
or errorViewName
parameters in the original request.
var parameters = {};
parameters.storeId = storeId;
parameters.langId=langId;
parameters.catalogId=catalogId;
parameters.catentryId=productId;
parameters.URL="MiniCartContentsJSON";
parameters.errorViewName="MiniCartContentsJSON";
dojo.xhrPost({
url: "OrderChangeServiceItemAdd",
handleAs: "json-comment-filtered",
content: parameters,
service: this,
load: refreshMiniCart,
error: function(errObj,ioArgs) {
alert("error");
}
});
This code snippet makes an AJAX request to the OrderChangeServiceItemAdd
service and then redirects to the MiniCartContentsJSON
view, which is mapped to a JSP file that creates a JSON object with its content. The client then gains control back and either the load
or error
function is called depending on the respective success or failure. The error scenario is only called when there are difficulties communicating with the WebSphere Commerce server. Otherwise, a success or exception from the WebSphere Commerce code executes the load
function which determines from the JSON object whether the request was successful or it failed. The load
function uses the JSON object and DOM manipulation API to replace all the elements in the page that should be updated with new data that resulted from the server update. URLs do not need to be registered as AjaxAction
, as this scenario does not make use of any of the new WebSphere Commerce AJAX framework.
The dojo.xhrPost
API is used in conjunction with the traditional WebSphere Commerce runtime programming model, where a request is made to a view that maps to a JSP file that creates a JSON object. On the load
function of the xhrPost
API, the DOM manipulation API is used to put the JSON contents in the web page elements.
<action-mappings type="com.ibm.commerce.struts.ECActionMapping">
<action path="/StoreCatalogDisplay"
parameter="com.ibm.commerce.catalog.commands.StoreCatalogDisplayCmd"
type="com.ibm.commerce.struts.BaseAction" />
<action path="/AddressAdd"
parameter="com.ibm.commerce.usermanagement.commands.AddressAddCmd"
type="com.ibm.commerce.struts.BaseAction">
<set-property property="https" value="0:0,201:1" />
<set-property property="authenticate" value="201:1" />
<set-property property="credentialsAccepted" value="201:P" />
</action>
</action-mappings>
<global-forwards>
<forward name="AddressBookForm" path="/AddressBookForm.jsp"/>
<forward className="com.ibm.commerce.struts.ECActionForward"
name="AddressBookForm/201"
path="/UserArea/AccountSection/AddressbookSubsection/AddressBookForm.jsp">
<set-property property="resourceClassName" value="com.ibm.commerce.command.HttpForwardViewCommandImpl" />
</forward>
<forward className="com.ibm.commerce.struts.ECActionForward"
name="GenericPasswordErrorView"
path="/GenericApplicationError.jsp">
<set-property property="properties" value="storeDir=no" />
<set-property property="resourceClassName" value="com.ibm.commerce.command.HttpForwardViewCommandImpl" />
</forward>
</global-forwards>
<action-mappings type="com.ibm.commerce.struts.ECActionMapping">
<action path="/AddressBookForm"
type="com.ibm.commerce.struts.BaseAction">
<set-property property="https" value="0:0,201:1" />
<set-property property="credentialsAccepted" value="201:P" />
</action>
<action path="/GenericPasswordErrorView"
type="com.ibm.commerce.struts.BaseAction" />
</action-mappings>
cachespec.xml
file: EdgeCacheable
, consume-subfragments
, save-attributes
, store-cookies
, sharing-policy
ECApplicationException
ECSystemException
updatedb
utility is used to update the WebSphere Commerce database to the latest fix pack level that is installed for your system.USERPROF
table.enableGiftCenterForServer.xml
or enableGiftCenterForToolkit.xml
GiftRegistryAuthentication
action grants access to the gift registry to any user (whether a gift registrant, co-registrant, or a gift giver). If the user is authenticated, the action creates a gift registry context for the user.BASEITEM
table are used exclusively for fulfillment.SRCHCONF
is the configuration table for WebSphere Commerce search integration.WC_ACTIVEPOINTER
WC_AUTHENTICATION_ID
WC_GENERIC_ACTIVITYDATA
WC_SESSION_ESTABLISHED
WC_USERACTIVITY_ID
WC_SESSION_ESTABLISHED
, can be used in the Management Center preview environment.Logoff
command deletes the persistent session. However, if rememberMe=true
is passed to the Logoff
command then the registered user is logged off but remembered.WC_PERSISTENT
cookie is used to persist user ID, language ID, and currency for each store ID visited in the session. Multiple sets of identifiers can exist if the user visits more than one store.wc-server.xml
).
<SessionManagement>
<url-rewriting display="false" enabled="false"/>
<cookie acceptance="false" age="-1" display="false"
domain="" enabled="true" path="/" persistence="wcs"/>
<referrerCookie age="-1"/>
<PersistentSession cookieExpiry="30"
delayNewPersistentGuestSession="true" display="false" enable="true"/>
<PersonalizationId display="false" enable="true"/>
<AllowMultipleLogonForSameUser display="false" enabled="true"/>
</SessionManagement>
[Exam notes]
wcpgl:widgetImport
tag. Each slot is defined by an internal slot ID, which must be unique within the container. The container JSP file is also used to identify the environment setup file and any predefined widgets.<%@include file="../Common/EnvironmentSetup.jspf" %>
<%@taglib uri="http://commerce.ibm.com/pagelayout" prefix="wcpgl"%>
<div class="rowContainer" id="container_${pageDesign.layoutID}">
<div>
<div class="col6 acol12" data-slot-id="1"><wcpgl:widgetImport slotId="1"/></div>
<div class="col6 acol12" data-slot-id="2"><wcpgl:widgetImport slotId="2"/></div>
</div>
<div>
<div class="col3 acol12" data-slot-id="3"><wcpgl:widgetImport slotId="3"/></div>
<div class="col3 acol12" data-slot-id="4"><wcpgl:widgetImport slotId="4"/></div>
<div class="col3 acol12" data-slot-id="5"><wcpgl:widgetImport slotId="5"/></div>
<div class="col3 acol12" data-slot-id="6"><wcpgl:widgetImport slotId="6"/></div>
</div>
<div>
<div class="col12" data-slot-id="7"><wcpgl:widgetImport slotId="7"/></div>
</div>
</div>
Breadcrumb
, Department
, CategoryRecommendation
, ContentRecommendation
, ProductRecommendation
, IntelligentOffer
, FacebookActivity
, FacebookConnect
, Important! FacebookLike
, Footer
, Header
, LanguageCurrency
, MiniShopCartDisplay
, Search
, ComponentListing
, LeftNavigation
, Discounts
, InventoryStatus
, MerchandisingAssociation
, PriceDisplay
, PriceQuantity
, ProductDescription
, ProductFullImage
, ProductTab
, Reviews
, TechnicalSpecification
, ShoppingList
, BundleSummary
, Important! PackageSummary
, CompareProduct
[Exam notes]
wcfBusinessObjectEditor
class is a base class that all Management Center tools must extend.wcfOrganizationalObjectDefinition
class describes an organizational object definition. Organizational objects are represented in the explorer view and the utilities browse view as high level navigation tree nodes. You can only declare instances of wcfOrganizationalObjectDefinition
as children of wcfBusinessObjectEditor
.wcfTopObjectDefinition
class is an organizational object definition that describes the root object for an instance of the wcfBusinessObjectEditor class
. This root object is the starting point for populating the navigation tree.wcfPrimaryObjectDefinition
class contains the definition for a primary object that describes a top level business object that exists as its own entity, independent of other objects.wcfChildObjectDefinition
class contains the definition for a child object that describes a secondary business object that is owned by a primary object or another child object.wcfPropertyDefinition
class describes a named property of a business object.wcfParentReferenceObjectDefinition
class defines a parent-child relationship in which each child can only have one parent. In this relationship, the parent is the owning object and the child is the referenced object. The owning object is the primary object definition that contains the parent reference object definition.wcfCollectionReferenceObjectDefinition
class defines a parent-child relationship in which each child can have more than one parent. In this relationship, the parent is the owning object and the child is the referenced object. The owning object is the primary object definition that contains the collection reference object definition.wcfReferenceObjectDefinition
class describes a relationship between two primary objects. This relationship object must be owned by one of these two primary objects, called the owning object. The other primary object is called the referenced object.[Exam notes]
testdata
to the Management Center URL. For example: https://<host>:8000/lobtools?testdata=/testdata/MyCompany/test.xml
XML file structure:
<testcase>
<action name="wcfAutoSetValueAction">
< param name="valueKey" value="storeIdentifier"/>
< param name="value" value="AdvancedB2BDirect"/>
</action>
<action name="wcfAutoRunTestCaseAction">
< param name="url" value="/testdata/commerce/catalog/restricted/test.xml"/>
</action>
</testcase>
The test automation framework supports the following actions:
wcfAutoRunTestCaseAction
action downloads a test case XML file from the specified URL and inserts the actions from this file at the start of the list of pending actions.wcfAutoOpenToolAction
action opens a specified Management Center tool, such as the Catalogs tool. If the tool is already open, it becomes the active tool.wcfAutoSetValueAction
action sets a value that can be used by other actions. This action is typically run during the setup portion of a test case so that other actions in the test case can refer to the value by way of the valueKey
parameter.wcfAutoSelectStoreAction
action switches the store for the current business object editor to the specified store.wcfAutoCreateNewObjectAction
action creates a new instance of a business object.wcfAutoSetPropertyAction
action sets a property value.wcfAutoDeleteObjectAction
action deletes the specified business object.wcfAutoFindObjectAction
action searches for the specified business object and saves it for other actions to use.wcfAutoGetChildObjectAction
action locates the specified child business object and saves it for other actions to use.wcfAutoLoadChildrenAction
action runs the get children services for the specified business object.wcfAutoSaveAllAction
action saves all unsaved business objects for the active Management Center tool.wcfAutoRefreshAllAction
action resets the active tool by releasing all of the objects that are currently loaded.wcfAutoVerifyObjectAction
action verifies that the specified business object exists.wcfAutoVerifyNoObjectAction
action verifies that the specified business object does not exist.wcfAutoVerifyPropertyAction
action verifies that the specified property matches a specified value.wcfAutoRunCustomServiceAction
action invokes a custom service on the specified business object.wcfAutoCreateVersionAction
action creates a version of a business object (sales catalog, category, and catalog entries).[Exam notes]
Business object | What you can do from store preview |
Catalog entries (products, SKUs, bundles, and kits) | Edit only |
Categories | Edit only |
E-Marketing Spots | Create and edit |
Web activities | Create and edit
Edit links are not shown for web activities in store preview that are:
|
Marketing content | Edit only |
Search rules | Create and edit
Edit links are not shown for search rules in store preview that are:
|
Pages | Edit only |
Layouts | Create and edit |
Widgets | Edit only |
wcfValidator
class.[Exam notes]
wc.resolveContentURL.cmsHost
is a configuration property for integrating WebSphere Commerce with a content management system. It defines the host name of the content URLs from the content management system.[2/21/06 9:55:03:848 CST] 52989e1b SystemErr R java.lang.UnsatisfiedLinkError:
C:\WebSphere\WebSphere MQ\Java\lib\mqjbnd05.dll: Can't find dependent libraries
Solution: The cause is the MQ_INSTALL_ROOT
variable by default is pointing to the WebSphere MQ client installation instead of the server installation.
Solution: The default value is "JMS" when a JNDI entry is defined for an outbound queue. The value of the targetClient field should be changed tocom.ibm.commerce.messaging.outboundservice.Messaging.sendReceiveImmediate() Message content is:
MQ
.
[1/12/11 12:23:45:124 EST] 0000002a CommerceSrvr E com.ibm.commerce.messaging.listener. TransportAdapterSerialDispatcher process() CMN9907E: A resource exception occurred during processing: "com.ibm.commerce.messaging.adapters.jca.exception.WcResourceException: Messaging system cannot commit a JMS Session for QueueConnectionFactory null . Error: javax.jms.IllegalStateException: Method not permitted in global transactionSolution: Disable the two-phase commit for the queue connection factory.
ComparisonConditionElementCmdImpl
PriceEquationCalculationCmdImpl
PriceListElementCmdImpl
STORE.INVENTORYSYSTEM=-5)
.INVCNF
(represents DOM inventory cache configuration) and INVCNFREL
(represents the relationship of an item and/or location with an inventory configuration) tables.EditableProperty
element to the JMS outbound connector's InteractionSpec
to set JMSHeaderProperty
WC_eardir/xml/config/com.ibm.commerce.order.external/wc-component-client.xml
to set asynchronous="true"
for ProcessOrder
message and to bind the action for the GetOrder
message.WCIntegrationUser
), Inventory System Heartbeat URL, Order System Heartbeat URL
GetOrderPriceToProcessOrderInput.xsl
file, locate the CalculationInfo
section and replace the following at the line, order, and or shipment level(s):
<_ord:AdjustmentApplyPolicy><xsl:text>FixedReplacement</xsl:text>
with<_ord:AdjustmentApplyPolicy><xsl:text>FixedAdjustment</xsl:text>
UPDATE CALRANGE SET CALMETHOD_ID=-13 WHERE CALRANGE_ID=-11;
UPDATE CALRLOOKUP SET VALUE=0 WHERE CALRLOOKUP_ID=-11;
INSERT INTO CALMETHOD VALUES (newidXXXXX, -1, -7, 'com.ibm.commerce.order.calculation.FixedAmountCalculationRangeCmd','method for a shipping discount range returning a fixed discount', 10, 'CalculationRange', NULL);
UPDATE CALRANGE SET CALMETHOD_ID = newidXXXX WHERE CALRANGE_ID=-12;
UPDATE CALRLOOKUP SET VALUE=0 WHERE CALRLOOKUP_ID=-12;
[Exam notes]
base.css
file. col*
classes.acol*
class for RWD-A (Mobile device) or ccol*
class for RWD-C (Desktop device).
For example, a row's child element can span 6 columns by default and 12 columns in the RWD-A (Mobile device) breakpoint by using class="col6 acol12"
.
col*
classes contain no breakpoints. Elements with only the col*
classes do not stack, regardless of the viewport width.acol*
classes. It is implemented in the following way: All child elements of a row use acol12
. For example, for a row containing 2 child elements with the col4 acol12
classes and col8 acol12
classes respectively. In this scenario, the child elements are side by side by default, spanning 4 and 8 columns respectively. The acol12
class, however, makes the child elements span 12 columns each in the RWD-A (Mobile device) breakpoint, so that they are laid out vertically, each spanning the full width of the row.col*
classes are used instead of bcol*
since it is used not only for RWD-B (Tablet device), but for all viewport widths, regardless of breakpoint. That is, RWD-B (Tablet device) is used by default and the acol*
and ccol*
classes are used as overrides.<Scenario name="SCENARIO_NAME"> <Env> <Parameter name="SHARED_1" value="value 1" /> <Parameter name="SHARED_2" value="value 2" /> </Env> <Test name="TEST_1"> <Datablock name="BLOCK_1"> <Input> <Parameter name="PARAMETER_1" value="value 1.1" /> <Parameter name="PARAMETER_2" value="value 2.1" /> </Input> <Output> <Parameter name="PARAMETER_1" value="value 3.1" /> <Parameter name="PARAMETER_2" value="value 4.1" /> </Output> </Datablock> <Datablock name="BLOCK_2"> <Input> <Parameter name="PARAMETER_1" value="value 1.2" /> <Parameter name="PARAMETER_2" value="value 2.2" /> </Input> <Output> <Parameter name="PARAMETER_1" value="value 3.2" /> <Parameter name="PARAMETER_2" value="value 4.2" /> </Output> </Datablock> </Test> <Test name="TEST_2"> <Datablock name="BLOCK_1"> <Input> <Parameter name="PARAMETER_1" value="value 1.3" /> <Parameter name="PARAMETER_2" value="value 2.3" /> </Input> </Datablock> </Test> </Scenario>The data files can be accessed within a test case that has the following field and annotation defined:
//A Variable to retrieve data from the data file. @DataProvider private final WteDataProvider dsm;
AuroraMobile.sar
or (FEP7+) Aurora.sar
[Exam notes]
Payment event | Target state of payment | Description |
---|---|---|
prime payment | APPROVED | The payment is approved when the order is captured. |
reserve payment | APPROVED | The payment is approved when the order is released to fulfillment. Specifically, ensure the payment is in the APPROVED state. If it is, take no action. If it is not, approve it. If it is only partially approved, ensure that the difference is approved. |
finalize payment | DEPOSITED | The payment is deposited when the order is fulfilled. |
Example: A customer places an order for two items that total 300 Euro: item A costs 100 EUR and is in stock. Item B costs 200 EUR and is not in stock but will be available in two days. The customer uses credit card brand X to pay for the order.
Payment event | Validation amount | Reservation amount | Finalization amount | Back-end system | |
---|---|---|---|---|---|
Amount approved | Amount deposited | ||||
prime payment (order capture) The initial amount is 100 EUR because only one item is available. |
100 | 0 | 0 | 100 | 0 |
Release A | |||||
reserve payment (release to fulfillment) | 100 | 100 | 0 | 100 | 0 |
finalize payment (shipping) | 100 | 100 | 100 | 100 | 100 |
Release B | |||||
reserve payment (release to fulfillment) | 0 The validation amount is zero at this stage because no validation activity is occurring. |
200 | 0 | 200 | 0 |
finalize payment (shipping) | 0 The validation amount is zero at this stage because no validation activity is occurring. |
200 | 200 | 200 | 200 |
EDPGlobalConfigs.xml
file is used to configure a payment system to use synchronous payment event. Change the <AlwaysExecuteProcessBGInFG>
element to true
.PaymentMethodConfigurations.xml
file is used to configure payment method details.
<PaymentMethodConfigurations>
<PaymentMethodConfiguration
name="CreditCardOffline"
paymentSystemName="OfflineCreditCardSystem"
systemEditable="true"
humanEditable="true"
refundAllowed="true"
minimumAmount="0"
maximumAmount="Unbounded"
priority="MEDIUM"
partiallyConsumable="true"/>
</PaymentMethodConfiguration>
</PaymentMethodConfigurations>
PaymentMappings.xml
file is used to configure the mapping from payment method to payment method configuration and payment rule.
<PaymentMappings>
<Mapping paymentMethod="VISA"
paymentConfiguration="CreditCardOffline"
paymentActionRule="Early Approval" />
<Mapping paymentMethod="Check"
paymentConfiguration="CheckOffline"
paymentActionRule="Early Deposit" />
</PaymentMappings>
PaymentSystemPluginMapping.xml
file is used to configure the mapping from payment system name to payment plug-in for different payment configuration groups.
<Mapper>
<RetainKeywords>
<Keyword name="billing_address_id"/>
</RetainKeywords>
<PaymentSystemName
name="SimpleOffline" >
<Mapping paymentConfigurationId="default" PluginName="SimpleOffline" >
<Keyword name="cc_cvc" mask="-" plain="0" removeAfterApproval="true" neverPersist="true"/>
<Keyword name="cc_nameoncard" mask="*" plain="0" removeAfterApproval="true" neverPersist="true" />
<Keyword name="account" mask="*" plain="-5" searchable="true"/>
</Mapping>
</PaymentSystemName>
</Mapper>
Plugin
interface. The interface defines a list of financial transactions that can be implemented by a plug-in:
checkPaymentInstruction
validatePaymentInstruction
approveAndDeposit
approve
reverseApproval
deposit
reverseDeposit
credit
reverseCredit
PluginDeployment.xml
and can be used to configure the payment protocol properties that you want to keep in the extended data for the payment instructions.POLICY
, POLICYDESC
, and POLICYCMD
tables are used to configure payment business policies for a store.POLICYCMD
table is used to set up the business policy commands:
DoPaymentActionsPolicyCmdImpl
EditPaymentInstructionPolicyCmdImpl
QueryPaymentsInfoPolicyCmdImpl
[Exam notes]
Data service layer limitations:
wc-query
and use the extension .tpl
. For example, wc-query-MyCompanyCatalogEntry-get.tpl
.SYMBOL_DEFINITIONS
defines column symbols that are used and referenced in the SELECT
list of SQL template statements. There must be only one BEGIN_SYMBOL_DEFINITIONS
, END_SYMBOL_DEFINITIONS
block per query template file.XPATH_TO_SQL_STATEMENT
links the logical and physical layers by mapping an XPath key directly to an SQL statement. The name
of the XPATH_TO_SQL_STATEMENT
is the key of the XPath expression. If an XPath key is defined in more than one query template file, the one defined in the file last loaded overrides the others. There can be more than one BEGIN_XPATH_TO_SQL_STATEMENT
, END_XPATH_TO_SQL_STATEMENT
block.ASSOCIATION_SQL_STATEMENT
defines a specific SQL query. These queries can then be reused to build different access profiles that are defined in the PROFILE
section. There can be more than one BEGIN_ASSOCIATION_SQL_STATEMENT
, END_ASSOCIATION_SQL_STATEMENT block
.SQL_STATEMENT
contains named SQL statements. The SQL statements are executed directly via the JDBC interface with the JDBCQueryService
class. This class is similar to the session bean JDBC helper used by SOI service modules.PROFILE
defines access profiles that use associated SQL statements. If needed, more than one associated SQL statement can be used by a profile. Each associated SQL statement performs in turn and the results of the different associated SQL statements are merged together with a GraphComposer
class. Queries that are associated with an access profile must always be defined in the same file where the access profile is defined. The exception for this definition location is when you extend an access profile. The extension mechanism provides you the capability to reuse the default associated SQL statements without having to redefine them in your custom query template file. There can be more than one BEGIN_PROFILE
, END_PROFILE
block. All the profile blocks have to be at the end of the file.PROFILE_ALIASES
define any aliases for profiles. The aliases have a global scope and are used for supporting deprecated access profiles that are renamed./Catalog[CatalogIdentifier[(UniqueID=))]
and access profile IBM_Admin_Details
:
BEGIN_SYMBOL_DEFINITIONS
COLS:CATALOG=CATALOG:*
COLS:CATALOGDSC=CATALOGDSC:*
COLS:STORECAT=STORECAT:*
END_SYMBOL_DEFINITIONS
BEGIN_XPATH_TO_SQL_STATEMENT
name=/Catalog[CatalogIdentifier[(UniqueID=)]]+IBM_Admin_Details
base_table=CATALOG
sql=
SELECT
CATALOG.$COLS:CATALOG$,
CATALOGDSC.$COLS:CATALOGDSC$,
STORECAT.$COLS:STORECAT$
FROM
CATALOG
JOIN STORECAT ON STORECAT.CATALOG_ID=CATALOG.CATALOG_ID
AND STORECAT.STOREENT_ID IN ($STOREPATH:catalog$)
LEFT OUTER JOIN CATALOGDSC ON CATALOGDSC.CATALOG_ID = CATALOG.CATALOG_ID
AND CATALOGDSC.LANGUAGE_ID IN ($CONTROL:LANGUAGES$)
WHERE
CATALOG.CATALOG_ID IN (?UniqueID?)
END_XPATH_TO_SQL_STATEMENT
In the preceding example, the XPath expression queries the catalogs with specified unique identifiers and the IBM_Admin_Details
access profile selects all columns from the CATALOG
, CATALOGDSC
, and STORECAT
tables for these catalogs.
/CatalogEntry[CatalogEntryIdentifier[(UniqueID=)]]
and access profile IBM_Admin_CatalogEntryDescription
:
BEGIN_SYMBOL_DEFINITIONS
COLS:CATENTRY=CATENTRY:*
COLS:CATENTRY_ID=CATENTRY:CATENTRY_ID
COLS:CATENTDESC=CATENTDESC:*
END_SYMBOL_DEFINITIONS
BEGIN_XPATH_TO_SQL_STATEMENT
name=/CatalogEntry[CatalogEntryIdentifier[(UniqueID=)]]
base_table=CATENTRY
sql=
SELECT
CATENTRY.$COLS:CATENTRY_ID$
FROM
CATENTRY
JOIN STORECENT ON (CATENTRY.CATENTRY_ID = STORECENT.CATENTRY_ID
AND STORECENT.STOREENT_ID = $CTX:STORE_ID$)
WHERE
CATENTRY.CATENTRY_ID IN (?UniqueID?) AND
CATENTRY.MARKFORDELETE = 0
END_XPATH_TO_SQL_STATEMENT
BEGIN_ASSOCIATION_SQL_STATEMENT
name=IBM_RootCatalogEntryWithDescription
base_table=CATENTRY
additional_entity_objects=true
sql=
SELECT
CATENTRY.$COLS:CATENTRY$,
CATENTDESC.$COLS:CATENTDESC$
FROM
CATENTRY
LEFT OUTER JOIN CATENTDESC ON CATENTDESC.CATENTRY_ID = CATENTRY.CATENTRY_ID
AND CATENTDESC.LANGUAGE_ID IN ($CONTROL:LANGUAGES$)
WHERE
CATENTRY.CATENTRY_ID IN ($ENTITY_PKS$)
END_ASSOCIATION_SQL_STATEMENT
BEGIN_PROFILE
name=IBM_Admin_CatalogEntryDescription
BEGIN_ENTITY
base_table=CATENTRY
associated_sql_statement=IBM_RootCatalogEntryWithDescription
END_ENTITY
END_PROFILE
In the preceding example, the XPath to SQL statement is used to fetch the primary keys from the base table, CATENTRY
. The base table for the XPath to SQL statement must be the same as the base table for the association SQL statement. The PROFILE
section lists the associated SQL statements to run for the IBM_Admin_CatalogEntryDescription
access profile. This example lists a single associated SQL statement, IBM_RootCatalogEntryWithDescription
, which is run with the primary keys substituted for the $ENTITY_PKS$
tag to retrieve all the data requested by the original query.OPTCOUNTER
column (of type SMALLINT
or INTEGER
) to the table. The column could be nullable.ibm-webservices-ext.xmi
file is used to specify security settings for Web services.ibm-webservices-bnd.xmi
file maps Web services to the transport listeners found in the WebServicesRouter project.CallbackHandler
implementation is created where the user identity and password can be specified so the service is invoked under that identity.OrderItem
noun with UserData
to include engraving information:
PATTRIBUTE
table.OrderFacadeClient.java
to expect new engraving attributes from the store. Extend ExtendOrderItemProcessCmdImpl.java
(implements ExtendOrderItemProcessCmd
) and ComposeOrderDetailsCmdImpl.java
(implements ComposeOrderCmd+IBM_Details
) to persist and retrieve the engraving information of an order item to the PATTRVALUE
table.OrderItem
noun with Overlays to include engraving information:
PATTRIBUTE
table.OrderItemType
to include your new engraving attributes.OrderFacadeClient.java
to expect new engraving attributes from the store. Extend ExtendOrderItemProcessCmdImpl.java
(implements ExtendOrderItemProcessCmd
) and ComposeOrderDetailsCmdImpl.java
(implements ComposeOrderCmd+IBM_Details
) to persist and retrieve the engraving information of an order item to the PATTRVALUE
table. Extend OrderFactoryImpl.java
to override the order factory so that your customized OrderItemType
is used.ChangeOrderSOIBODMapping.xml
and component-services-user-template.xml
CatalogEntry
noun UserData
element.CatalogEntryDescription
noun part attributes element.<_cat:CatalogEntry catalogEntryTypeCode="ProductBean">
<_cat:CatalogEntryIdentifier>
<_wcf:UniqueID>10251</_wcf:UniqueID>
<_wcf:ExternalIdentifier ownerID="7000000000000000101">
<_wcf:PartNumber>FULO-01</_wcf:PartNumber>
</_wcf:ExternalIdentifier>
</_cat:CatalogEntryIdentifier>
<_cat:Description language="-1">
<_cat:Name>White Fabric Roll Arm Chaise</_cat:Name>
<_cat:Thumbnail>images/catalog/FULO_01_sm.jpg</_cat:Thumbnail>
<_cat:FullImage>images/catalog/FULO_01.jpg</_cat:FullImage>
<_cat:ShortDescription>Plumply padded for your ultimate comfort.</_cat:ShortDescription>
<_cat:Attributes name="catentryId">10251</_cat:Attributes>
<_cat:Attributes name="languageId">-1</_cat:Attributes>
<_cat:Attributes name="careinstruction">Warranty description for the chaise.</_cat:Attributes>
</_cat:Description>
<_wcf:UserData>
<_wcf:UserDataField name="warterm">30</_wcf:UserDataField>
<_wcf:UserDataField name="wartype">LIMITED</_wcf:UserDataField>
</_wcf:UserData>
</_cat:CatalogEntry>
XWARRANTY->CATENTRY
, XCAREINSTRUCTION->CATENTRY,CATENTDESC
WC_eardir\xml\config\com.ibm.commerce.catalog-ext
WC_eardir\xml\config\com.ibm.commerce.catalog-ext\wc-object-relational-metadata.xml
WebSphereCommerceServerExtensionsLogic
project. Physical SDOs are service data objects that represent tables in WebSphere Commerce.WC_eardir\xml\config\com.ibm.commerce.catalog-ext\wc-component.xml
WC_eardir\xml\config\com.ibm.commerce.catalog-ext\wc-business-object-mediator.xml
.WC_eardir\xml\config\com.ibm.commerce.catalog-ext\wc-query-MyCompanyCatalogEntry-get.tpl
WC_eardir\xml\config\com.ibm.commerce.catalog-ext\wc-query-MyCompanyCatalogEntry-update.tpl
wc-business-object-mediator.xml
to instruct the Catalog service module to use the newly defined access profiles. This profile causes the Catalog service module to use the new queries, which include the custom tables, instead of the default queries provided by WebSphere Commerce.[Exam notes]
SolrQuery
object right before it is sent to the Solr server for processing.SolrEntityContainerImpl
, immediately after the QueryResponse
is returned from the Solr server.wc-search.xml
). SRCHATTR
table.SRCHATTRPROP
table.SRCHATTRDESC
table.schema.xml
) to include profit margin field.wc-data-config.xml
) to calculate profit margin and include it into the search index.SRCHATTR
, SRCHATTRPROP
, and SRCHATTRDESC
tables so that profit margin displays as a filter and sort criteria in product recommendations.wc-component.xml
) to map the profit margin field to a user data.wc-search.xml
) to let it return the value of the profit margin field in a new search profile.wc-rest-resourceconfig.xml
).[Exam notes]
ubdatdb
utility has been running for several hours. After power is restored, ubdatedb
utility is run again. It fails with an sql error code -612.ubdatedb
utility has already ran. So, restore database and run ubdatedb
utility again.
OrderItemAddCmd
/OrderCalculateCmd
to call the external service. CartHandler
will automatically recognize the extension.
CATENTDESC
custom fields (field1
, field2
).
XCATENTRY
table, create access bean/data bean to fetch information from the table.
CATENTRY.FIELD1
. Which components need to be modified to display this information on product display page via search?schema.xml
, wc-data-config.xml
, <_config:result ....>
in wc-search.xml
struts-config-member-services.xml
, UserRegistrationAddCmd
store-refs.xml