Troubleshooting: Store development
While developing your store, you might experience the following scenarios.
Changing your store to merge products of the same SKU, as inventory checks are made while adding products to the shopping cart
WebSphere Commerce starter stores perform a soft inventory check by default when items are added to the shopping cart. When adding items to the shopping cart, no inventory allocation is performed, as it is usually performed in latter stages of the checkout process. The only check performed while adding items to the shopping cart is to see if there is sufficient inventory to possibly fulfill the current requested quantity for the item being added. It does not, however, take into account any existing items that already exist in the current shopping cart.
merge
parameter with a
value of *
. For example, in the default starter stores, you change the following
JSP files: - CachedItemDisplay.jsp
- CachedProductOnlyDisplay.jsp
- CachedProductItemDisplay.jsp
<input type="hidden" name="merge" value="*" />
After making these changes, you should be shown an error message, "insufficient inventory to fulfill your request", when trying to add an item to the shopping cart, where the inventory count of the item being added, plus any of the same item in the shopping cart exceeds the total available inventory of the store.
See OrderItemAdd URLfor more information.
The File not found exception
Due to an operating system limitation, a File not found exception may be thrown during the initial translation of a JSP page when the length of the absolute path of a file that the page references (for example, a JSP page fragment) exceeds 256 characters. As a result, store developers are advised to keep the names of newly created files and directories short and to limit the level of directory nesting.
XHTML validation errors
All JSP pages used in the starter stores conform to the XHTML 1.0 Transitional document type. When examined with HTML validators such as the Rational Application Developer HTML validator, however, several pages result in the following XHTML validation errors:
- No start tag (<tr>)
- To display multiple items in tables, starter stores make use of custom display logic that determines when to start a new row, when to alternate the color, and so on. Although the result is a fully XHTML-compliant page, the dynamic code appears to have badly formed rows to validators.
- Unknown tag ( xx: yyyy)
- Unlike top-level JSP pages ( .jsp files), JSP segments ( .jspf files) typically do not contain tag library directives. As a result, validators fail to recognize custom JSP tags, such as <c:choose>, <fmt:message>, and <flow:fileRef>, when they are used in JSP segments.
You may safely ignore these validation errors.