Merge pull request #2419 from jitendra-webkul/1.0

Issue #2395 fixed
This commit is contained in:
Jitendra Singh 2020-02-11 13:13:58 +05:30 committed by GitHub
commit 0a4fae72dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -168,9 +168,10 @@ class Cart {
if (isset($cartProduct['parent_id']) && $cartItem->parent_id != $parentCartItem->id) {
$cartItem = $this->cartItemRepository->create(array_merge($cartProduct, ['cart_id' => $cart->id]));
} else {
if ($product->getTypeInstance()->showQuantityBox() === false) {
if ($cartItem->product->getTypeInstance()->showQuantityBox() === false) {
return ['warning' => __('shop::app.checkout.cart.integrity.qty_impossible')];
}
$cartItem = $this->cartItemRepository->update($cartProduct, $cartItem->id);
}
}