use of com.teachMeSkills.an15.VorobyovSergey.hwSix.Task3.models.SvBasket in project AN15 by IharDubkou.
the class SvCatalogServiceImpl method addProductInBasket.
@Override
public void addProductInBasket(SvUser user, SvProduct product) {
System.out.println("\nКорзина покупателя");
SvBasket basket = user.getUserBasket();
basket.addToBasket(product);
user.setUserBasket(basket);
System.out.println("В корзине теперь");
for (SvProduct p : user.getUserBasket().getProductList()) {
System.out.println(p);
}
}