String ebayStoreCategory = (String)paramMap.get("ebayCategoryId");
// when change category should be remove old category from session
if (ebayStoreCategory.indexOf("CH_") != -1) {
ebayStoreCategory = ebayStoreCategory.replace("CH_", "");
if (UtilValidate.isNotEmpty(ebayStoreCategory)) {
ApiContext apiContext = EbayEvents.getApiContext(request);
Map<String,Object> addItemObject = EbayEvents.getAddItemListingObject(request, apiContext);
String refName = "itemCateFacade_".concat(ebayStoreCategory);
if (UtilValidate.isNotEmpty(addItemObject.get(refName))) {
addItemObject.remove(refName);
}
}
ebayStoreCategory = "";
}
request.setAttribute("productStoreId", paramMap.get("productStoreId"));
request.setAttribute("categoryId", ebayStoreCategory);
ApiContext apiContext = EbayEvents.getApiContext(request);
EbayStoreSiteFacade sf = EbayEvents.getSiteFacade(apiContext,request);
results = EbayEvents.getStoreChildCategories(request);
if (UtilValidate.isNotEmpty(results)) {
List<Map<String,Object>> categories = FastList.newInstance();
for (StoreCustomCategoryType category : results) {