Subversion Repositories SmartDukaan

Rev

Rev 4382 | Rev 4384 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4382 Rev 4383
Line 111... Line 111...
111
	
111
	
112
	/**
112
	/**
113
	 * Checks whether a product is laptop or not
113
	 * Checks whether a product is laptop or not
114
	 */
114
	 */
115
	private boolean isLaptop(Item item) {
115
	private boolean isLaptop(Item item) {
-
 
116
		
116
		Category category = CategoryManager.getCategoryManager().getCategory(item.getCategory());
117
		Category category = CategoryManager.getCategoryManager().getCategory(item.getCategory());
117
        long parentCategoryId = category.getParent_category_id();
118
//        long parentCategoryId = category.getParent_category_id();
118
        
119
        
119
        return category.getId() == Utils.LAPTOPS_CATEGORY ? true : false;
120
        return category.getId() == Utils.LAPTOPS_CATEGORY ? true : false;
120
	}
121
	}
121
	
122
	
122
	/**
123
	/**
Line 302... Line 303...
302
		List<Long> itemIds = new ArrayList<Long>();
303
		List<Long> itemIds = new ArrayList<Long>();
303
		
304
		
304
		for(Long entityId: entityIdItemMap.keySet()){
305
		for(Long entityId: entityIdItemMap.keySet()){
305
			List<Item> items = entityIdItemMap.get(entityId);
306
			List<Item> items = entityIdItemMap.get(entityId);
306
			Item firstItem = items.get(0);
307
			Item firstItem = items.get(0);
307
			if(isMobile(firstItem)) {
308
			if(isMobile(firstItem) || isLaptop(firstItem)) {
308
				itemIds.add(firstItem.getId());
309
				itemIds.add(firstItem.getId());
309
			}
310
			}
310
		}
311
		}
311
 
312
 
312
		PromotionClient promotionClient = new PromotionClient();
313
		PromotionClient promotionClient = new PromotionClient();