Subversion Repositories SmartDukaan

Rev

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

Rev 4383 Rev 4384
Line 295... Line 295...
295
	/**
295
	/**
296
	 * Generate the xml list of all the active phones and store in a file
296
	 * Generate the xml list of all the active phones and store in a file
297
	 * @throws Exception
297
	 * @throws Exception
298
	 */
298
	 */
299
	public void generateProductXMLForDisplayAds() throws Exception {
299
	public void generateProductXMLForDisplayAds() throws Exception {
300
 
-
 
-
 
300
		Utils.info("Generating Product XML for display ads");
301
		List<String> productXMLSnippets = new ArrayList<String>();
301
		List<String> productXMLSnippets = new ArrayList<String>();
302
		productXMLSnippets.add("<saholic.com>");
302
		productXMLSnippets.add("<saholic.com>");
303
		List<Long> itemIds = new ArrayList<Long>();
303
		List<Long> itemIds = new ArrayList<Long>();
-
 
304
 
-
 
305
		Utils.info("Entity Ids: " + entityIdItemMap.keySet());
304
		
306
		
305
		for(Long entityId: entityIdItemMap.keySet()){
307
		for(Long entityId: entityIdItemMap.keySet()){
306
			List<Item> items = entityIdItemMap.get(entityId);
308
			List<Item> items = entityIdItemMap.get(entityId);
307
			Item firstItem = items.get(0);
309
			Item firstItem = items.get(0);
-
 
310
			Utils.info("first Item: " + firstItem);
-
 
311
			
308
			if(isMobile(firstItem) || isLaptop(firstItem)) {
312
			if(isMobile(firstItem) || isLaptop(firstItem)) {
309
				itemIds.add(firstItem.getId());
313
				itemIds.add(firstItem.getId());
310
			}
314
			}
311
		}
315
		}
312
 
316
 
Line 318... Line 322...
318
		Map<Long, ItemCouponDiscount> couponsAndDiscounts = new HashMap<Long, ItemCouponDiscount>();
322
		Map<Long, ItemCouponDiscount> couponsAndDiscounts = new HashMap<Long, ItemCouponDiscount>();
319
		
323
		
320
		for (ItemCouponDiscount itemCouponDiscount: itemsCouponsAndDiscounts) {
324
		for (ItemCouponDiscount itemCouponDiscount: itemsCouponsAndDiscounts) {
321
			couponsAndDiscounts.put(itemCouponDiscount.getItemId(), itemCouponDiscount);
325
			couponsAndDiscounts.put(itemCouponDiscount.getItemId(), itemCouponDiscount);
322
		}
326
		}
-
 
327
		Utils.info("Entity IDs: " + entityIdItemMap.keySet());
323
		
328
		
324
		for(Long entityId: entityIdItemMap.keySet()) {
329
		for(Long entityId: entityIdItemMap.keySet()) {
325
			List<Item> items = entityIdItemMap.get(entityId);
330
			List<Item> items = entityIdItemMap.get(entityId);
326
			Item firstItem = items.get(0);
331
			Item firstItem = items.get(0);
-
 
332
			
-
 
333
			Utils.info("First Item: " + firstItem);
-
 
334
			
327
			if(!isMobile(firstItem) && !isLaptop(firstItem)){
335
			if(!isMobile(firstItem) && !isLaptop(firstItem)){
328
				continue;
336
				continue;
329
			}
337
			}
330
			
338
			
331
			productXMLSnippets.add(this.xmlIndentation[1] + "<products>");	
339
			productXMLSnippets.add(this.xmlIndentation[1] + "<products>");