Enable Intelligent sequencing and featured image features for Commerce Insights
To change either the sequence of your products or the featured image in Commerce Insights, we must take steps to enable these options before we can use them.For more information about product sequencing, see Changing product sequence in Store view. For more information about featured images, see Changing a product's featured image in Store view.
Before beginning
(Developer) Create a staging trigger before you do this procedure. (DB2) For Db2 databases, use the following SQL files:
- WCBD_installdir\schema\db2\wcs.stage.sequence.sql
- WCBD_installdir\schema\db2\wcs.stage.trigger.sql
For example:
db2 connect to db_name user db_user using db_password db2 -tvf WCBD_installdir\schema\db2\wcs.stage.sequence.sql db2 -td# -vf WCBD_installdir\schema\db2\wcs.stage.trigger.sql(Oracle) For Oracle databases, use the following SQL files: (Oracle)
- WCBD_installdir\schema\oracle\wcs.stage.sequence.sql
- WCBD_installdir\schema\oracle\wcs.stage.trigger.sql
If we are working in the authoring environment, we must disable the Solr document, filter, and query-result caches while performing the steps described below. To disable the Solr caches, perform the steps described in Extending the solrconfig.xml file and set the values of the following parameters to zero.
- solr.documentCache.size
- solr.documentCache.initialSize
- solr.filterCache.size
This feature requires using the Master/Subordinate/Repeater deployment topology. See Index-building topologies and scenarios.
About this task
To enable Intelligent sequencing, you will edit the /src/runtime/config/com.ibm.commerce.search/wc-component.xml file in the search-config-ext project. Once this is done, you will configure a scheduled job, and set up our search index.
Procedure
- Move to the /src/runtime/config/com.ibm.commerce.search directory. If there is no wc-component.xml file in the directory, copy or rename the existing wc-component-template.xml to wc-component.xml. Edit wc-component.xml so that it includes the following EnableProductDisplayConfiguration search property. For more information about editing the component configuration file, see Changing properties in the component configuration file (wc-component.xml). :
<_config:configgrouping name="SearchConfiguration"> <!-- EnableProductDisplayConfiguration This configuration defines whether to allow configuring product display properties such as overriding product image or product sequence in a category. Default is false. Change this to "true" if required to enable this feature. --> <_config:property name="EnableProductDisplayConfiguration" value="true" /> </_config:configgrouping>Edit the component configuration file to include the following BACSFTPServerSetting search property. Add the following code inside the <_config:extendedconfiguration> element:
<!-- BACSFTPServerSetting BAC SFPT Server settings This section defines the communication settings with the Commerce server. --> <_config:configgrouping name="BACSFTPServerSetting"> <_config:property name="BACSFTPServerSetting/port" value="29001"/> <_config:property name="BACSFTPServerSetting/hostname" 1 value="hostname"/> <_config:property name="BACSFTPServerSetting/username" 2 value="username"/> <_config:property name="BACSFTPServerSetting/userPassword" 3 value="password"/> <_config:property name="BACSFTPServerSetting/remoteDirectory" value="inbox/metrics"/> <_config:property name="BACSFTPServerSetting/localDirectory" value="localFileCopyDirectory"/> </_config:configgrouping>Where
- 1 Hostname
- Define the host name of your Commerce Insights server.
- 2 Username
- Define the FTP downloading user name for our Commerce Insights account.
- 3 Password
- Define the FTP downloading password for our Commerce Insights account.
Notes:
- The FTP downloading user name and password can be found in the Configuration section of Commerce Insights. For more information about this password, see Configure your Watson Commerce Insights account.
- Use the wcs_encrypt to encrypt the FTP downloading password. For more information about wcs_encrypt, see Generate encrypted data (wcs_encrypt).
- Save and close the file.
If we are using configuring multiple environments, for example a staging environments and a production environment, we can create targetable versions of your wc-component.xml files to deploy to these environments. For more information about this advanced deployment feature, see Support for multiple target environments.
- Deploy the customized wc-component.xml file to the runtime environment.
- Configure the TriggerMetricFileDownload scheduled job in the WebSphere Commerce Administration Console to download metrics to the search server.
Note: For testing purposes we can configure this scheduled job on your development environment; otherwise, configure the schedule job on the runtime environment.
- Open the Administration Console and select Site.
- Click OK.
- From the menu, click Configuration > Scheduler.
- Click New. The Schedule Job window opens.
- Configure the scheduled job with the following value:
Parameter Value Job Command TriggerMetricFileDownload Job parameters Enter the following job parameter:
- storeId
- Specify the storeId. For example, storeId=10201.
Note: If you have multiple stores, set up this job for each store.
Start date Enter the current date. Start time Enter a time to start the job for the first time. Schedule interval This job should run once daily. Set the value to 3600.
What to do next
When the product display configuration for product sequencing and featured images is enabled, increase the Solr JVM maximum heap space by a minimum of 15 MB per category. For more information about increasing the Solr JVM maximum heap, see WebSphere Commerce Search performance tuning.
- Disable Intelligent sequencing and featured image features for Commerce Insights
We can make the product sequencing and featured image options unavailable to users in the Commerce Insights Store view. If product sequencing and featured image are unavailable, the Edit Content option does not appear in Store view.