check if we have to verify stock on duplicate cart

This commit is contained in:
Manuel Raynaud
2013-08-06 11:23:52 +02:00
parent 1d1bd65a94
commit e0be762236

View File

@@ -30,7 +30,11 @@ class Cart extends BaseCart
$product = $cartItem->getProduct();
$productSaleElements = $cartItem->getProductSaleElements();
if ($product && $productSaleElements && $product->getVisible() == 1 && $productSaleElements->getQuantity() > $cartItem->getQuantity()) {
if ($product &&
$productSaleElements &&
$product->getVisible() == 1 &&
($productSaleElements->getQuantity() > $cartItem->getQuantity() || ! ConfigQuery::read("verifyStock", 1)))
{
$item = new CartItem();
$item->setCart($cart);