@Override
	public void addProductToCart(UserModel user, int productId, int quantity)
			throws WebshopAppException {

		if (isValidUser(user, "ADD_PRODUCT_TO_SHOPPING_CART")
				&& isPositiveQuantity(quantity, "ADD_PRODUCT_TO_SHOPPING_CART")) {

			try (Connection conn = getConnection()) {

				int db_quantity = getProductQuantity(conn, user, productId);

				deleteProductFromShoppingCart(conn, user, productId);

				int newQuantity = db_quantity + quantity;

				insertProductQuantity(conn, user, productId, newQuantity);

				Log.logOut(LOGGER, this, "ADD_PRODUCT_TO_SHOPPING_CART",
						"Added ", String.valueOf(quantity), " product of id: ",
						String.valueOf(productId), " to user: ",
						user.getEmail());

			} catch (SQLException e) {
				WebshopAppException excep = new WebshopAppException(e, this
						.getClass().getSimpleName(),
						"ADD_PRODUCT_TO_SHOPPING_CART");
				Log.logOutWAException(LOGGER, excep);
				throw excep;
			}
		}

	}