This blog promotes knowledge sharing through experience and collaboration. For more product information, visit our WebSphere Commerce CSE page. For easier navigation, utilize the Categories to find posts that match your interest.
Troubleshooting Images in Watson Commerce Insights
Helping clients enable their sites with Watson Commerce Insights, I noticed that there are sometimes customizations or miss-configurations to WebSphere Commerce that can result in product thumbnails not displaying. WCI retrieves product thumbnails in different ways depending on which part of the product you use:
Next I describe them in detail and share troubleshooting tips.
Images in the workspace
Certain widgets such as Watched Products or Store Product Rankings display product thumbnails. The thumbnail URLs are included with the catalog upload, from the CATENTDESC.THUMBNAIL column.
Images under Preview
Watson Commerce Insights relies on Store Preview to display metric overlays and give you access to the sequencing tools. WCI does not change how images are loaded under Preview. If images are not loading, you are likely to have the same problem when Store Preview is used from within Management Center.
In Store Preview, images are retrieved using a special arrangement. Whereas under the live store images are returned from the web server, under Preview images are always returned from the WebSphere Commerce server. This is done so the WCS server can look for the assets in the database before using the file system. To map the images to the WCS server, WebSphere Commerce changes the context root from the web server alias (/wcsstore/) to /webapp/wcs/preview. If your store is based on Aurora, the wcf:url tag automatically handles the appending of the Preview context root.
Sample paths for regular store and preview:
The "Featured Image" feature allows you to select a different thumbnail to display for the product under the category listing. The new thumbnail needs to belong to one of the product's SKUs.
This featured can be accessed from the sequencing panels.
Similar to sequencing information, featured images are stored in external files. See the blog post Sequencing in Watson Commerce Insights for details. The alternate image is only displayed under the context of a category. If the product is listed under a search, or if you navigate directly to the product page, the standard thumbnail is displayed.
The REST call also includes a new attribute called imageDisplayItemID, which links to the SKU that matches the selected image. In the Aurora store, if you click on a product with a featured image, the browser redirects to the SKU page instead of the product page. If your store is not based on Aurora, you can review the Aurora's JSPs to understand the customization (Search for "imageDisplayItemID"). If you have customization to hide SKUs, be sure to test the scenario where the featured image is mapped to a SKU that is not displayable, as it could lead to errors.
Images in the sequencing panel
The Manual and Intelligent Sequencing panels lists products for a category. The list of products is retrieved from the Search Server using a REST call.
The REST call (/search/previewresources/store/<storeId>/productview/byCategoryForAdmin/<categoryId>) returns the thumbnail path along with other product attributes:
Same as before, if the CATENTDESC.THUMBNAIL column contains an absolute path, it is returned as-is. If the path is relative, under Preview WebSphere Commerce pre-appends "/webapp/wcs/preview" to the image path. WCI then appends the store hostname to create an absolute path. Note that the Product image path configuration is not used here.
Troubleshooting tips for images
Images thumbnails might not display when either the product does not specify a thumbnail URL, or the when the browser is unable to retrieve the image.
If the default image is shown in the WCI workspace or in the Sequencing panel, query the CATENTDESC.THUMBNAIL column for the part number and ensure a thumbnail URL is specified.
The following are common scenarios that prevent images from displaying correctly:
By clicking on the missing image, WCI displays the following popup message:
Compare the URL used by WCI to the actual URL you know is correct. Also review the contents of the CATENTDESC.csv file which is part of the Catalog upload. The forth column is the CSV is the path as stored in the THUMBNAIL column.