Subversion Repositories SmartDukaan

Rev

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

Rev 5432 Rev 5446
Line 343... Line 343...
343
		try {
343
		try {
344
			in.shop2020.user.domain.Cart cart = cartMapper.getCart(cartId);
344
			in.shop2020.user.domain.Cart cart = cartMapper.getCart(cartId);
345
			boolean codOption = true;
345
			boolean codOption = true;
346
			try{
346
			try{
347
				if(cart!=null) {
347
				if(cart!=null) {
348
					if(cart.getCoupon_code() != null && cart.getCoupon_code().toLowerCase().equals("saccessory")) {
348
					if(cart.getCoupon_code() != null && cart.getCoupon_code().toLowerCase().equals("searlybird")) {
349
						codOption = false;
349
						codOption = false;
350
					} else if(cart.getLines()!=null){
350
					} else if(cart.getLines()!=null){
351
						for(Line line : cart.getLines()) {
351
						for(Line line : cart.getLines()) {
352
							LogisticsService.Client logisticsClient = new LogisticsClient().getClient();
352
							LogisticsService.Client logisticsClient = new LogisticsClient().getClient();
353
							LogisticsInfo logisticsInfo = logisticsClient.
353
							LogisticsInfo logisticsInfo = logisticsClient.
Line 355... Line 355...
355
							if(!logisticsInfo.isCodAllowed()){
355
							if(!logisticsInfo.isCodAllowed()){
356
								codOption = false;
356
								codOption = false;
357
								break;
357
								break;
358
							}
358
							}
359
						}
359
						}
-
 
360
			            if(cart.getTotal_price() > 20000 || cart.getTotal_price() <= 250)
-
 
361
			            	codOption = false;
360
					}
362
					}
361
				}
363
				}
362
			}catch(LogisticsServiceException ex) {
364
			}catch(LogisticsServiceException ex) {
363
				log.error("Error in getting COD option");
365
				log.error("Error in getting COD option");
364
				codOption = false;
366
				codOption = false;