Subversion Repositories SmartDukaan

Rev

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

Rev 17787 Rev 17796
Line 466... Line 466...
466
    								allSame = maxEstimate==0 || maxEstimate==itemObj.getInt("estimate");
466
    								allSame = maxEstimate==0 || maxEstimate==itemObj.getInt("estimate");
467
    							}
467
    							}
468
    							if(itemObj.getInt("estimate")>maxEstimate){
468
    							if(itemObj.getInt("estimate")>maxEstimate){
469
    								maxEstimate = itemObj.getInt("estimate");
469
    								maxEstimate = itemObj.getInt("estimate");
470
    							}
470
    							}
471
    							cartObj.put("imageUrl", pp.getImageUrl());
471
    							itemObj.put("imageUrl", pp.getImageUrl());
472
    							cartObj.put("title", pp.getTitle());
472
    							itemObj.put("title", pp.getTitle());
473
    						}
473
    						}
-
 
474
    						if (maxEstimate==-1){
-
 
475
    							cartObj.put("estimateString", "Can't ship here");
-
 
476
    						} else {
474
    						cartObj.put("estimateString", LogisticsService.getDeliveryDateString(maxEstimate,DeliveryType.COD));
477
    							cartObj.put("estimateString", LogisticsService.getDeliveryDateString(maxEstimate,DeliveryType.COD));
-
 
478
    						}
475
    						cartObj.put("sameEstimate", allSame);
479
    						cartObj.put("maxEstimate", maxEstimate);
476
    						cartPojoJson = cartObj.toString();
480
    						cartPojoJson = cartObj.toString();
477
    					} else {
481
    					} else {
478
    						cartPojoJson = "{\"response\":\"error\", \"message\":\"Problem occurred while updating cart\"}";
482
    						cartPojoJson = "{\"response\":\"error\", \"message\":\"Problem occurred while updating cart\"}";
479
    					}
483
    					}
480
    				}
484
    				}