IBM WebSphere Commerce Suite SPE Customization

Transcription

IBM WebSphereCommerce SuiteSPE CustomizationReady-to-use examples for mostcommon customizationsE-commerce solutions forbusinesses of all sizesPerformance tips forsystem administratorsOle ConradsenAlison HallidayThomas KjaerGopala KrishnanOscar Torresibm.com/redbooks

SG24-5958-00International Technical Support OrganizationIBM WebSphere Commerce SuiteSPE CustomizationNovember 2000

Take Note!Before using this information and the product it supports, be sure to read the general information inAppendix K, “Special notices” on page 393.First Edition (November 2000)This edition applies to WebSphere Commerce Suite, Service Provider Edition (SPE) Version 3, Release2 for use with AIX and Windows Operating Systems.This document created or updated on November 30, 2000.Comments may be addressed to:IBM Corporation, International Technical Support OrganizationDept. JN9B Building 003 Internal Zip 283411400 Burnet RoadAustin, Texas 78758-3493When you send information to IBM, you grant IBM a non-exclusive right to use or distribute theinformation in any way it believes appropriate without incurring any obligation to you. Copyright International Business Machines Corporation 2000. All rights reserved.Note to U.S Government Users – Documentation related to restricted rights – Use, duplication or disclosure issubject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.

ContentsFigures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ixTables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiiPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvThe team that wrote this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvComments welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviChapter 1. Installing WCS Service Provider Edition . . . . . . .1.1 Products included with WCS SPE . . . . . . . . . . . . . . . . . . . .1.2 Hardware and software requirements . . . . . . . . . . . . . . . . . .1.2.1 Hardware requirements . . . . . . . . . . . . . . . . . . . . . . . .1.2.2 Software requirements . . . . . . . . . . . . . . . . . . . . . . . . .1.3 Disk space and paging space requirements . . . . . . . . . . . . .1.3.1 Verifying disk space . . . . . . . . . . . . . . . . . . . . . . . . . . .1.3.2 Verifying paging space . . . . . . . . . . . . . . . . . . . . . . . . .1.4 Common installation steps . . . . . . . . . . . . . . . . . . . . . . . . . .1.4.1 Installation procedures for Domino Go 4.6.2.61 . . . . . .1.4.2 Enabling SSL on Domino Go Webserver for testing . . .1.4.3 Verifying the installation . . . . . . . . . . . . . . . . . . . . . . . .1.5 Installing IBM DB2 UDB 6.1.0.6 . . . . . . . . . . . . . . . . . . . . . .1.5.1 Installation procedure . . . . . . . . . . . . . . . . . . . . . . . . . .1.5.2 Verifying the installation . . . . . . . . . . . . . . . . . . . . . . . .1.6 Installing IBM DB2 Text Extenders . . . . . . . . . . . . . . . . . . . .1.7 Installing IBM Net.Data 6.1 . . . . . . . . . . . . . . . . . . . . . . . . . .1.7.1 Installation procedures . . . . . . . . . . . . . . . . . . . . . . . . .1.8 Installing JDK1.1.6 and WebSphere Application Server . . . .1.8.1 Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.8.2 Installing JDK 1.1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . .1.8.3 WebSphere Application Server installation procedures .1.9 Installing IBM Payment Server . . . . . . . . . . . . . . . . . . . . . . .1.10 Installing WebSphere Commerce Service Provider. . . . . . .1.11 Configuring WCS SPE . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.11.1 Net.Commerce settings . . . . . . . . . . . . . . . . . . . . . . .1.11.2 LDGW settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter 2. Configuration of the server environment2.1 Unique URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.1 Running the server with multiple IP addresses2.2 Shop directory structure . . . . . . . . . . . . . . . . . . . . . Copyright IBM Corp. 2000. .1. .1. .2. .2. .3. .3. .3. .4. .4. .5. .6. .8. .9. .9. 11. 12. 13. 14. 14. 14. 15. 15. 17. 17. 18. 19. 22.or virtual hosts. 25. 25. 26. 39iii

Chapter 3. WCS SPE product overview. . . . . . . . . . . . . . . . . . . . . . . . . 433.1 WCS SPE architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433.1.1 Overview of components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Chapter 4. Building custom stores in a shared environment .4.1 The merchant store model . . . . . . . . . . . . . . . . . . . . . . . . . . .4.2 Customizing the look of a store . . . . . . . . . . . . . . . . . . . . . . .4.3 Enabling Net.Commerce features . . . . . . . . . . . . . . . . . . . . . .4.4 Adding new Net.Commerce functionality . . . . . . . . . . . . . . . .4.4.1 Net.Commerce architecture . . . . . . . . . . . . . . . . . . . . . .4.4.2 Using Overridable functions or commands . . . . . . . . . . . 51. 51. 54. 55. 56. 56. 59Chapter 5. Shopper groups . . . . . . . . . . . . . . . . . . . .5.1 Customizing WCS to offer shopper group features .5.1.1 Shopper group basic . . . . . . . . . . . . . . . . . . .5.1.2 The customization . . . . . . . . . . . . . . . . . . . . . 61. 62. 62. 69Chapter 6. Cross-sell and up-sell . . . . . . . . . . . . . . . . . . . . . . . . .6.1 What is cross-selling and up-selling . . . . . . . . . . . . . . . . . . . . . .6.2 Customization techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.2.1 Creating product relationship by mass import utility . . . . . .6.2.2 Import data through browser-based mass import tool . . . . .6.2.3 Creating product relationship by customizing merchant tool. 103. 103. 104. 104. 117. 121.Chapter 7. External business system integration . . . . . . . . . . . . . . . 1277.1 Integrating external business system with Net.Commerce . . . . . . . . 127ivChapter 8. Customizing the store creation wizard .8.1 The catalog screen . . . . . . . . . . . . . . . . . . . . . . . .8.2 Creating custom category and product pages . . . .8.2.1 Custom category pages . . . . . . . . . . . . . . . .8.2.2 Custom product pages . . . . . . . . . . . . . . . . .8.2.3 How the store creation wizard works . . . . . .8.2.4 Creating new category and products panels .8.2.5 Adding new product and category panels . . . 129. 129. 130. 130. 137. 141. 147. 156Chapter 9. Extended customization features . . . . .9.1 Shipping by product weight . . . . . . . . . . . . . . . . .9.1.1 Shipping calculation in WCS SPE . . . . . . . . .9.1.2 Database tables . . . . . . . . . . . . . . . . . . . . . .9.1.3 Planning shipping by weight . . . . . . . . . . . . .9.1.4 Adding new features to the merchant tool . . .9.1.5 Calculating shipping cost . . . . . . . . . . . . . . .9.1.6 Activating shipping by weight for a merchant. 161. 161. 166. 167. 173. 190. 195. 196IBM WebSphere Commerce Suite SPE Customization

9.2 Adding off-line payment methods . . . .9.2.1 Payment methods in detail . . . . .9.3 Gift messages/wrapping . . . . . . . . . . .9.3.1 The scenario . . . . . . . . . . . . . . .9.3.2 Planning the feature . . . . . . . . . .9.3.3 Designing the feature . . . . . . . . .9.3.4 Database model . . . . . . . . . . . . .9.3.5 Implementing the ISP interface . .9.3.6 Changing the store page . . . . . .9.3.7 Implementing the business logic .9.3.8 Extending the merchant tool . . . .9.3.9 How to charge the customer . . . . 198. 198. 205. 206. 206. 207. 208. 210. 212. 215. 217. 222Chapter 10. Provisioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10.1 Calling the store creation wizard directly by URL . . . . . . . . . . . . .10.1.1 Basic store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10.1.2 Advanced store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10.2 Passing existing customer data to the store creation wizard . . . . .10.2.1 Custom registration page . . . . . . . . . . . . . . . . . . . . . . . . . . .10.2.2 Displaying e-mail and password automatically on login page10.2.3 Storing customer details in the store creation wizard . . . . . .10.2.4 Displaying customer details in the Home Page screen . . . . . 225. 225. 225. 227. 228. 228. 230. 232. 233Chapter 11. Multi-language support . . . . . . . .11.1 Background . . . . . . . . . . . . . . . . . . . . . . . .11.2 Store creation wizard multi-language panel11.3 Multi-language macros . . . . . . . . . . . . . . . . 237. 237. 237. 239.Appendix A. Multi purpose code generation language . . . . . . . . . . . . 243A.1 Introduction to MPG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243A.1.1 Why MPG? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244A.2 Data model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246A.2.1 Declaring model variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246A.2.2 Creating the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247A.2.3 Creating the model from a file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249A.3 Language elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250A.3.1 Lexical structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250A.3.2 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252A.3.3 Data types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253A.3.4 Expressions and operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253A.3.5 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255A.3.6 Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259A.3.7 Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260A.3.8 4.10 including other templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265v

Appendix B. ShopperGroup code samples . . . . . . . . . . . . . . . . . . . . . . 267B.1 RegWrapper source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267B.2 RegWrapper makefile for WinNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272B.3 RegWrapper initialization SQLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272B.4 Macro file creagru.d2w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272B.5 Macro file addshgru.d2w. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276B.6 Macro addprgru.d2w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281Appendix C. Source code for cross and up selling . . . . . . . .C.1 productRel.d2w Net.Data macro to associate products . . . . . .C.2 Customized product display (cat product.d2w) macro . . . . . . .C.3 Definition file of mass import utility (prprrel.ini) . . . . . . . . . . . . .291291293297Appendix D. Store creation wizard sample code . . . . . . . . . . . . . . . . . 301D.1 Three level category example, file more cat.inc . . . . . . . . . . . . . . . . . . 301D.2 You are here custom page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302D.2.1 you are here.js file listning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303D.3 Shortened product page example, cat product2.d2w file. . . . . . . . . . . . 304D.4 The “You are here” custom product page and file you are here.inc . . . 318D.5 Full macros XML parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319D.6 CheckForChanges.js JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324D.7 DisplayPagesServlet.java servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326D.8 MacrosBean.java class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328D.9 DisplayPages.jsp page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330D.10 HTML panel pages and file Displaycats./ . . . . . . . . . . . . . . . . . . . . . . . 331D.11 Displayprods.html . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333D.12 Advanced.xml includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335D.13 Configurations for samples and Directory structure . . . . . . . . . . . . . . . 335D.13.1 HTML, JavaScript, jsp and macro configuration . . . . . . . . . . . . . . 336D.13.2 Websphere configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336Appendix E. Shipping by weight source code. . . . . . . . . . . . . . . . . . . . 339E.1 Macro file shipbywdata.d2w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339E.2 Macro file shipbyweight.d2w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341E.3 Macro file shipbywenable.d2w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344E.4 C function GetOrdByWt.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346E.5 Makefile for GetOrdByWt.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349E.6 reg GetOrdByW.db2.sql SQL script . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350Appendix F. Payment method code lists . . . . . . . . . . . . . . . . . . . . . . . . 351F.1 PaymentWizard.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351F.2 OfflineInstructions.tem tewmplate code . . . . . . . . . . . . . . . . . . . . . . . . . 354viIBM WebSphere Commerce Suite SPE Customization

Appendix G. Source code for gift message/wrapping . . . . . . . . . . . . . 357G.1 HTML file giftadmin.htm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357G.2 Macro file giftadmin.d2w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357G.3 Macro file giftadmin2.d2w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358G.4 Macro file giftadminstore.d2w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360G.5 Makefile for addGiftMsg OF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362G.6 Source code for addGiftMsg.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363G.7 Modified OrderDetails.tem template . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366Appendix H. Provisioning sample code . . . . . . . . . . . . . . . . . . . . . . . . . 379H.1 Provisioning HTML example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379H.2 Registration example HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380Appendix I. Multi-language samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383I.1 displaylangs.html . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383I.2 langs.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386I.3 Changes to Model.tem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386I.4 Changes to advanced.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386I.5 langAdd.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386Appendix J. Using the additional material . . . . . . . . . . . . . . . .J.1 Locating the additional material on the Internet. . . . . . . . . . . . .J.2 Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J.2.1 System requirements for downloading the Web material .J.2.2 How to use the Web material . . . . . . . . . . . . . . . . . . . . . .391391391391392Appendix K. Special notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393Appendix L. Related publications . . .L.1 IBM Redbooks . . . . . . . . . . . . . . . . . .L.2 IBM Redbooks collections . . . . . . . . .L.3 Other resources. . . . . . . . . . . . . . . . .L.4 Referenced Web sites . . . . . . . . . . . .397397397397398How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399IBM Redbooks fax order form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407IBM Redbooks review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415vii

viiiIBM WebSphere Commerce Suite SPE Customization

35.36.37.38.39.40.Editing the PROCESS variable in the configuration file . . . . . . . . . . . . . . . 20Editing the MS TRANS COUNT variable in the configuration file . . . . . . 21Ncadmin login screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31The Site Manager button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Choose Store Records to get information on stores . . . . . . . . . . . . . . . . . 32The list of stores in the bottom frame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33The Store Status field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33JAVA code for frytor.html . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34The Domino Go Webserver start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34The Username and Password screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35The welcome page file list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35The welcome page file list tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36The Java function welcome text() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38How to invoke the function welcome text. . . . . . . . . . . . . . . . . . . . . . . . . . 39The directory and file structure of the Domino Go Webserver. . . . . . . . . . 40The directory and file structure of the Net.Commerce . . . . . . . . . . . . . . . . 41The common files and directories on AIX . . . . . . . . . . . . . . . . . . . . . . . . . 42The common files and directories on Windows NT 4.0 . . . . . . . . . . . . . . . 42WCS SPE overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Relationship among xml files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47NetCommerce Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Commands, Tasks and Overridable Functions . . . . . . . . . . . . . . . . . . . . . 49Fetching the merchant ID from the database. . . . . . . . . . . . . . . . . . . . . . . 52The preloaded HTML files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53The common files and directories on AIX . . . . . . . . . . . . . . . . . . . . . . . . . 64The common files and directories on WINDOWS NT 4.0 . . . . . . . . . . . . . 64Data model for categories, products and items . . . . . . . . . . . . . . . . . . . . . 67Data model on merchants, stores, shopper groups, and customers . . . . . 67The macro cat category.d2w after the changes . . . . . . . . . . . . . . . . . . . . 68The macro cat product.d2w after the changes . . . . . . . . . . . . . . . . . . . . . 69The MCUSTINFO table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70SQL for example mcustinfo row. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Store and mall wide registration screen . . . . . . . . . . . . . . . . . . . . . . . . . . . 72The macro cat category.d2w. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72The macro cat category.d2w after the changes . . . . . . . . . . . . . . . . . . . . 73The Report Section of the cat cat number of the store .d2w macro . . . . 75Part of the function DISPLAY PRODUCT LIST SINGLEPRICE(). . . . . . 76The SQL statement of DISPLAY PRODUCT LIST SINGLEPRICE() . . . 77The GET SHOPPERGROUP() function . . . . . . . . . . . . . . . . . . . . . . . . . . 78The GET CODEPRICE() function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Copyright IBM Corp. 2000ix

4.75.76.77.78.79.80.81.82.83.xThe new HTML Report section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79The DISPLAY PRODUCT LIST SINGLEPRICE ISNULL function. . . . . 80The macro cat category.d2w. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81The macro cat product.d2w after the changes . . . . . . . . . . . . . . . . . . . . . 82The Report Section of the cat pro number of the store .d2w macro . . . . 83Part of the function DISPLAY PRODUCT SINGLEPRICE() . . . . . . . . . . 84SQL statement of function DISPLAY PRODUCT SINGLEPRICE(). . . . . 85The GET SHOPPERGROUP()function. . . . . . . . . . . . . . . . . . . . . . . . . . . 86The GET CODEPRICE()function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86The new HTML Report section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87The DISPLAY PRODUCT SINGLEPRICE ISNULL function . . . . . . . . . 88The macro cat catalog.d2w. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89The macro cat cataloc.d2w after the changes . . . . . . . . . . . . . . . . . . . . . 90Important section of the cat catalog store number .d2w file . . . . . . . . . 91The modified GET SINGLEPRICE FEATUREPRODUCT() function . . . . 92The GET SHOPPERGROUP()function. . . . . . . . . . . . . . . . . . . . . . . . . . . 93The GET CODEPRICE()function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Part of the new HTML Report section . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94The GET SINGLEPRICE FEATUREPRODUCT ISNULL function . . . . . 95The navigation.xml file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97The new added lines on navigationNLS.properties file . . . . . . . . . . . . . . . 98The screen of the creagrou.d2w macro . . . . . . . . . . . . . . . . . . . . . . . . . . 100The screen of the addshgru.d2w macro . . . . . . . . . . . . . . . . . . . . . . . . . 101The screen of the addprgru.d2w macro . . . . . . . . . . . . . . . . . . . . . . . . . . 102Product page with cross-sell and up-sell features . . . . . . . . . . . . . . . . . . 109Cross-sell and up-sell functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Code displaying cross or up sold products . . . . . . . . . . . . . . . . . . . . . . . 114Code for closing the new window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115ShowSell function to display cross-sell/up-sell product in same window . 116Modified Cross-sell and up-sell functions . . . . . . . . . . . . . . . . . . . . . . . . 116Merchant tool displaying product catalog features. . . . . . . . . . . . . . . . . . 118Import data using the catalog import utility . . . . . . . . . . . . . . . . . . . . . . . 121Customized merchant tool - product relationship data entry page. . . . . . 124Customized merchant tool - Related products confirmation page . . . . . . 125Default category page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Default product page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130DISPLAY CATEGORIES function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131GET CHILD CATS function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132DISPLAY CATS function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Three-level category custom page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134YOU ARE HERE CAT include file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135YOU ARE HERE JavaScript functions. . . . . . . . . . . . . . . . . . . . . . . . . . 136Include statements for cat category3.d2w . . . . . . . . . . . . . . . . . . . . . . . 136IBM WebSphere Commerce Suite SPE Customization

84. YOU ARE HERE custom category page . . . . . . . . . . . . . . . . . . . . . . . . 13785. Shortened product page example code . . . . . . . . . . . . . . . . . . . . . . . . . . 13886. Shortened custom product page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13987. GET PROD CAT function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14088. DISPLAY YOU ARE HERE function for custom product page . . . . . . . 14089. The “YOU ARE HERE custom product page . . . . . . . . . . . . . . . . . . . . . 14190. SQL to select merchant’s reference number . . . . . . . . . . . . . . . . . . . . . . 14291. SQL to select product and category macros . . . . . . . . . . . . . . . . . . . . . . 14292. XML definitions for category and product pages . . . . . . . . . . . . . . . . . . . 14393. Altered XML parameter for custom category page . . . . . . . . . . . . . . . . . 14494. ChangeXML JavaScript function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14595. SetXMLchanges JavaScript function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14696. Design flow for new wizard panels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14897. Category.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14898. Product.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14999. Imports for DisplayPagesServlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150100.ParseXML method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151101.DisplayPagesServlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153102.MacrosBean class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154103.Storing the pages choices in the JSP page. . . . . . . . . . . . . . . . . . . . . . . 155104.Displaying the page choices on the panel. . . . . . . . . . . . . . . . . . . . . . . . 156105.Adding a new panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157106.StoreCreatorBasicNLS.properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157107.Store Wizard category pages panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159108.Store Wizard product pages panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160109.Adding a new shipping method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161110.Add locations for which there are different shipping rates. . . . . . . . . . . . 162111.Define shipping categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162112.Price grid for the shipping method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163113.Sample calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164114.Define the shipping code with the merchant tool. . . . . . . . . . . . . . . . . . . 165115.Presenting the purchase price for the customer . . . . . . . . . . . . . . . . . . . 166116.Shipping data model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168117.SHIPJURST table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168118.PRSPCODE table listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169119.mshipmode table example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170120.shipmode table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172121.PSHIPRULE table, Publish Shipping Rate Rule Table . . . . . . . . . . . . . . 172122.Order processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174123.Content of ORDERS table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176124.Data in selected columns in SHADDR table . . . . . . . . . . . . . . . . . . . . . . 178125.Shipto table content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

IBM WebSphere Commerce Suite SPE Customization Ole Conradsen Alison Halliday Thomas Kjaer Gopala Krishnan Oscar Torres Ready-to-use examples for most common customizations E-commerce solutions for businesses of all sizes Performance tips for system administrators. IBM WebSphere Commerce Suite