Subversion Repositories SmartDukaan

Rev

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

Rev 6624 Rev 6625
Line 228... Line 228...
228
	private void getProductsXML(ArrayList<String> irDataXMLSnippets) throws Exception{
228
	private void getProductsXML(ArrayList<String> irDataXMLSnippets) throws Exception{
229
		LogisticsService.Client prod_client = null;
229
		LogisticsService.Client prod_client = null;
230
		Map<Long, ItemCouponDiscount> couponsAndDiscounts = new HashMap<Long, ItemCouponDiscount>();
230
		Map<Long, ItemCouponDiscount> couponsAndDiscounts = new HashMap<Long, ItemCouponDiscount>();
231
		
231
		
232
		try {
232
		try {
233
			LogisticsClient logistics_prod = new LogisticsClient("logistics_service_prod_server_host","logistics_service_prod_server_port");
-
 
234
			prod_client = logistics_prod.getClient();
-
 
235
			
233
			
236
			List<Long> itemIds = new ArrayList<Long>();
234
			List<Long> itemIds = new ArrayList<Long>();
237
			
235
			
238
			for(Long entityId: entityIdItemMap.keySet()){
236
			for(Long entityId: entityIdItemMap.keySet()){
239
				
237
				
Line 251... Line 249...
251
			List<ItemCouponDiscount> itemsCouponsAndDiscounts = promotionServiceClient.getItemDiscountMap(itemIds);
249
			List<ItemCouponDiscount> itemsCouponsAndDiscounts = promotionServiceClient.getItemDiscountMap(itemIds);
252
			
250
			
253
			for (ItemCouponDiscount itemCouponDiscount: itemsCouponsAndDiscounts) {
251
			for (ItemCouponDiscount itemCouponDiscount: itemsCouponsAndDiscounts) {
254
				couponsAndDiscounts.put(itemCouponDiscount.getItemId(), itemCouponDiscount);
252
				couponsAndDiscounts.put(itemCouponDiscount.getItemId(), itemCouponDiscount);
255
			}
253
			}
-
 
254
 
-
 
255
			LogisticsClient logistics_prod = new LogisticsClient("logistics_service_prod_server_host","logistics_service_prod_server_port");
-
 
256
			prod_client = logistics_prod.getClient();
256
			
257
			
257
		} catch (Exception e) {
258
		} catch (Exception e) {
258
			prod_client = null;
259
			prod_client = null;
259
			Utils.info("Logistics estimations can't be fetched as Logistics Service is inaccessible" + e);
260
			Utils.info("Logistics estimations can't be fetched as Logistics Service is inaccessible" + e);
260
		}
261
		}
261
		
262
		
262
		for(Long entityId: entityIdItemMap.keySet()){
263
		for(Long entityId: entityIdItemMap.keySet()){
263
			List<Item> items = entityIdItemMap.get(entityId);
264
			List<Item> items = entityIdItemMap.get(entityId);
264
			Item firstItem = items.get(0);
265
			Item firstItem = items.get(0);
265
			
266
			
266
			if(!isMobile(firstItem) && !isTablet(firstItem))	{
267
			if(!isMobile(firstItem) && !isTablet(firstItem) && !firstItem.isShowSellingPrice())	{
267
				continue;
268
				continue;
268
			}
269
			}
269
			
270
			
270
			irDataXMLSnippets.add(this.xmlIndentation[1] + "<products>");	
271
			irDataXMLSnippets.add(this.xmlIndentation[1] + "<products>");	
271
			
272