Subversion Repositories SmartDukaan

Rev

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

Rev 17785 Rev 17786
Line 448... Line 448...
448
    						Integer quantity = obj.getInt("quantity");
448
    						Integer quantity = obj.getInt("quantity");
449
    						ItemQuantity iq = new ItemQuantity(itemId, quantity);
449
    						ItemQuantity iq = new ItemQuantity(itemId, quantity);
450
    						itemQuantities.add(iq);
450
    						itemQuantities.add(iq);
451
    					}
451
    					}
452
    					userClient = getClient();
452
    					userClient = getClient();
453
    					if (userClient.addItemsToCart(jsonObj.getLong("cartId"), itemQuantities, jsonObj.getString("couponCode"))){
453
    					if (userClient.addItemsToCart(id, itemQuantities, jsonObj.getString("couponCode"))){
454
    						log.info("Items added to cart Successfully");
454
    						log.info("Items added to cart Successfully");
455
    						//Now validate cart and provide appropriate response.
455
    						//Now validate cart and provide appropriate response.
456
    						String cartString = userClient.validateCartNew(id, userinfo.getPincode(), -1);
456
    						String cartString = userClient.validateCartNew(id, userinfo.getPincode(), -1);
457
    						JSONObject cartObj = new JSONObject(cartString);
457
    						JSONObject cartObj = new JSONObject(cartString);
458
    						JSONArray arr = cartObj.getJSONArray("cartItems");
458
    						JSONArray arr = cartObj.getJSONArray("cartItems");