Subversion Repositories SmartDukaan

Rev

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

Rev 21386 Rev 21389
Line 130... Line 130...
130
						cartObj.put("cartMessagesMerged", cartObj.getInt("cartMessagesMerged") + 1);
130
						cartObj.put("cartMessagesMerged", cartObj.getInt("cartMessagesMerged") + 1);
131
					}
131
					}
132
				}
132
				}
133
			}
133
			}
134
			ProductPojo pp = ContentPojoPopulator.getShortContent(itemObj.getLong("catalogItemId"));
134
			ProductPojo pp = ContentPojoPopulator.getShortContent(itemObj.getLong("catalogItemId"));
135
			logger.info("ProductPojo "+pp);
-
 
136
			String productProperties = ContentServingService.getSnippet(Utils.PRODUCT_PROPERTIES_SNIPPET, pp.getId() +"", -1);
135
//			String productProperties = ContentServingService.getSnippet(Utils.PRODUCT_PROPERTIES_SNIPPET, pp.getId() +"", -1);
137
			logger.info("productProperties "+productProperties);
-
 
138
			JSONObject productPropertiesInJson = new JSONObject(productProperties);
136
//			JSONObject productPropertiesInJson = new JSONObject(productProperties);
139
			pp.setCategoryName(productPropertiesInJson.getString("categoryName"));
137
//			pp.setCategoryName(productPropertiesInJson.getString("categoryName"));
140
 
138
 
141
			if(itemObj.has("estimate")){
139
			if(itemObj.has("estimate")){
142
				if(allSame){
140
				if(allSame){
143
					allSame = maxEstimate==-2 || maxEstimate==itemObj.getInt("estimate");
141
					allSame = maxEstimate==-2 || maxEstimate==itemObj.getInt("estimate");
144
				}
142
				}
145
				if(itemObj.getInt("estimate") > maxEstimate){
143
				if(itemObj.getInt("estimate") > maxEstimate){
146
					maxEstimate = itemObj.getInt("estimate");
144
					maxEstimate = itemObj.getInt("estimate");
147
				}
145
				}
148
			}
146
			}
149
			itemObj.put("imageUrl", pp.getImageUrl());
147
			itemObj.put("imageUrl", pp.getImageUrl());
150
			itemObj.put("categoryName", pp.getCategoryName());
-
 
151
			itemObj.put("title", pp.getTitle());
148
			itemObj.put("title", pp.getTitle());
152
		}
149
		}
153
 
150
 
154
		ArrayList<JSONObject> listdata = new ArrayList<JSONObject>();     
151
		ArrayList<JSONObject> listdata = new ArrayList<JSONObject>();     
155
		if (arr != null) { 
152
		if (arr != null) {