String ovrdKeyword = productStoreKeywordOvrd.getString("keyword");
if (keywords.contains(ovrdKeyword)) {
String targetTypeEnumId = productStoreKeywordOvrd.getString("targetTypeEnumId");
String target = productStoreKeywordOvrd.getString("target");
ServletContext ctx = (ServletContext) request.getAttribute("servletContext");
RequestHandler rh = (RequestHandler) ctx.getAttribute("_REQUEST_HANDLER_");
if ("KOTT_PRODCAT".equals(targetTypeEnumId)) {
String requestName = "/category/~category_id=" + target;
target = rh.makeLink(request, response, requestName, false, false, false);
} else if ("KOTT_PRODUCT".equals(targetTypeEnumId)) {
String requestName = "/product/~product_id=" + target;
target = rh.makeLink(request, response, requestName, false, false, false);
} else if ("KOTT_OFBURL".equals(targetTypeEnumId)) {
target = rh.makeLink(request, response, target, false, false, false);
} else if ("KOTT_AURL".equals(targetTypeEnumId)) {
// do nothing, is absolute URL
} else {
Debug.logError("The targetTypeEnumId [] is not recognized, not doing keyword override", module);
// might as well see if there are any others...