Subversion Repositories SmartDukaan

Rev

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

Rev 17901 Rev 17902
Line 472... Line 472...
472
						JSONObject itemObj = arr.getJSONObject(j-removedCount);
472
						JSONObject itemObj = arr.getJSONObject(j-removedCount);
473
						if(!itemsList.contains(itemObj.getInt("itemId"))){
473
						if(!itemsList.contains(itemObj.getInt("itemId"))){
474
							 if(itemObj.getInt("quantity")==0){
474
							 if(itemObj.getInt("quantity")==0){
475
								arr.remove(j-removedCount);
475
								arr.remove(j-removedCount);
476
								removedCount++;
476
								removedCount++;
477
								if (itemObj.getInt("estimate")==-1){
477
								if (itemObj.has("estimate") && itemObj.getInt("estimate")==-1){
478
									cartObj.put("cartMessageUndeliverable", cartObj.getInt("cartMessageUndeliverable") - 1);
478
									cartObj.put("cartMessageUndeliverable", cartObj.getInt("cartMessageUndeliverable") - 1);
479
								} else {
479
								} else {
480
									cartObj.put("cartMessageOOS", cartObj.getInt("cartMessageOOS") - 1);
480
									cartObj.put("cartMessageOOS", cartObj.getInt("cartMessageOOS") - 1);
481
								}
481
								}
482
								continue;
482
								continue;
Line 494... Line 494...
494
						}
494
						}
495
						ProductPojo pp = PojoPopulator.getShortContent(itemObj.getLong("catalogItemId"));
495
						ProductPojo pp = PojoPopulator.getShortContent(itemObj.getLong("catalogItemId"));
496
						if(allSame){
496
						if(allSame){
497
							allSame = maxEstimate==-1 || maxEstimate==itemObj.getInt("estimate");
497
							allSame = maxEstimate==-1 || maxEstimate==itemObj.getInt("estimate");
498
						}
498
						}
499
						if(itemObj.getInt("estimate")>maxEstimate){
499
						if(itemObj.has("estimate") && itemObj.getInt("estimate") > maxEstimate){
500
							maxEstimate = itemObj.getInt("estimate");
500
							maxEstimate = itemObj.getInt("estimate");
501
						}
501
						}
502
						itemObj.put("imageUrl", pp.getImageUrl());
502
						itemObj.put("imageUrl", pp.getImageUrl());
503
						itemObj.put("title", pp.getTitle());
503
						itemObj.put("title", pp.getTitle());
504
					}
504
					}