Skip to content

Commit 05a96ce

Browse files
committed
Fix stock condition
1 parent 7076bf3 commit 05a96ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

code/Helper/Data.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,11 @@ protected function getProductsRecords($storeId, $collection, $potentiallyDeleted
458458
continue;
459459
}
460460

461-
if ($product->isDeleted() === true || $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED || (int) $product->getVisibility() <= Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE || $product->getStockItem()->is_in_stock === '0') {
461+
if ($product->isDeleted() === true
462+
|| $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED
463+
|| (int) $product->getVisibility() <= Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE
464+
|| ($product->getStockItem()->is_in_stock == 0 && !$this->config->getShowOutOfStock($storeId))
465+
) {
462466
$productsToRemove[$productId] = $productId;
463467
continue;
464468
}

0 commit comments

Comments
 (0)