Untitled
unknown
plain_text
2 years ago
527 B
1
Indexable
Never
EKartCustomerCartException("CustomerCartService.NO_CART_FOUND")); if(cart.getCartProducts().isEmpty()){ throw new EKartCustomerCartException("CustomerCartService.NO_PRODUCT_ADDED_TO_CART"); } CartProductselectedProduct=null; for(CartProductproduct:cart.getCartProducts()){ if(product.getProductId().equals(productId)){ selectedProduct=product; } } if(selectedProduct==null){ throw new EKartCustomerCartException("CustomerCartService.PRODUCT_ALREADY_NOT_AVAILABLE"); } selectedProduct.setQuantity(quantity); } }