Subversion Repositories SmartDukaan

Rev

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

Rev 17862 Rev 17863
Line 444... Line 444...
444
    				JSONArray cartItems = jsonObj.getJSONArray("cartItems");
444
    				JSONArray cartItems = jsonObj.getJSONArray("cartItems");
445
    				List<Integer> itemsList = new ArrayList<Integer>();
445
    				List<Integer> itemsList = new ArrayList<Integer>();
446
					for (int i=0; i< cartItems.length(); i++) {
446
					for (int i=0; i< cartItems.length(); i++) {
447
						JSONObject obj = cartItems.getJSONObject(i);
447
						JSONObject obj = cartItems.getJSONObject(i);
448
						//Just to avoid garage values
448
						//Just to avoid garage values
-
 
449
						int itemId = 0;
449
						try{
450
						try{
450
							int itemId = obj.getInt("itemId");
451
							itemId = obj.getInt("itemId");
451
						} catch(Exception e){
452
						} catch(Exception e){
452
							continue;
453
							continue;
453
						}
454
						}
454
						Integer quantity = obj.getInt("quantity");
455
						Integer quantity = obj.getInt("quantity");
455
						ItemQuantity iq = new ItemQuantity(itemId, quantity);
456
						ItemQuantity iq = new ItemQuantity(itemId, quantity);