Skip to content

Commit 1457abe

Browse files
authored
Update develop with 1.x changes (#927)
1 parent a177a77 commit 1457abe

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Helper/Entity/ProductHelper.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,10 +1156,18 @@ public function canProductBeReindexed($product, $storeId, $isChildProduct = fals
11561156
return true;
11571157
}
11581158

1159+
/**
1160+
* Returns is product in stock
1161+
*
1162+
* @param Product $product
1163+
* @param int $storeId
1164+
*
1165+
* @return bool
1166+
*/
11591167
public function productIsInStock($product, $storeId)
11601168
{
11611169
$stockItem = $this->stockRegistry->getStockItem($product->getId());
11621170

1163-
return $stockItem->getIsInStock();
1171+
return $product->isSaleable() && $stockItem->getIsInStock();
11641172
}
11651173
}

0 commit comments

Comments
 (0)