Setting up your extension development environment
You can use the Extensibility Workbench to extend IBM® Sterling Store Web.
Using the extensibility tool, you can customize the application as needed for your business. You can add UI widgets such as labels, text boxes, check boxes, and others. You can either modify the default properties of any widget or add new widgets and specify the layout bindings, and theme properties for these widgets. You can synchronize the differences in theme entries, bundle entries, and templates.
Before you begin
- By default, all extensions are saved in the installation directory. Therefore, ensure that the installation directory is accessible on the server where Sterling Store is deployed.
- Ensure that the installation directory has both read and write permissions. For users who extend the application must have write permission.
- It is suggested that you deploy the application in exploded development Web Archive (WAR) mode.
Use the
wscdev.war(Sterling Store Development WAR) file. This file contains more folders andweb.xmlentries that are required for extensibility. In production, you must deploywsc.warwith the required extensions created by using thewscdev.warfile.To set up the extensibility environment, do the following steps:
- Create the
wscdev.warfile by running the following command:buildwar.sh (buildwar.cmd for Windows) -Dappserver=<application server> -Dwarfiles=wscdevNote: If you use EAR mode for deployment, includewscdevWAR in the build EAR command. For more information about building the EAR and WAR files, see Installing topicInstalling topic on the corresponding version of the Sterling Selling and Fulfillment Suite information center. - Deploy the application WAR.
- Ensure that the value of the
uiExtensibilityModesystem argument for the application server is set totrue.By default, the extensions are created in the <INSTALL_DIR>/extensions/<app>/webpages/ directory. Here,
<app>refers to the application code.Optionally, you can create extensions in any other directory by setting the value of system argument to
uiExtensibilityWorkspaceDir. For example, -DuiExtensibilityWorkspaceDir=<workspace directory>. Here,<workspace directory>refers to the directory where extensions are created. Before you create WAR, copy the extensions from workspace directory to install directory. - For Extensibility Workbench, use wsc
dev.war. Ensure that the URL to log into the Extensibility Workbench is http://<IP address>:<port>/wscdev/store/login.do? from the desktop.Note: You can customize mobile windows by entering the mobile URL from a desktop device. The mobile URL is http://<IP address>:<port>/wscdev/store/mobile/login.do?.
- Create the
- To extend the application, it is suggested that each user has a dedicated runtime and application server deployment. Otherwise, the extensions might be overwritten.
- You can plug in the custom code in the
<screen-name>Extn.jsfile. If the<screen-name>Extn.jsfile is already present, and if you modify a screen, the existing<screen-name>Extn.jsis not overwritten. Instead, a new<screen-name>Extn_sample.jsis created to ensure that the custom code is not lost. You can use the new sample file as reference.