Skip to content

Commit 875ad0a

Browse files
MAGETWO-64669: Performance degradation for bundle product if price view set as from..toy
1 parent 672a408 commit 875ad0a

File tree

1 file changed

+2
-2
lines changed
  • app/code/Magento/Bundle/Model/Product

1 file changed

+2
-2
lines changed

app/code/Magento/Bundle/Model/Product/Type.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public function isVirtual($product)
344344
}
345345
}
346346

347-
return $virtualCount === $selections->getSize();
347+
return $virtualCount === count($selections);
348348
}
349349

350350
return false;
@@ -627,7 +627,7 @@ protected function _prepareProduct(\Magento\Framework\DataObject $buyRequest, $p
627627
if (!empty($selectionIds)) {
628628
$selections = $this->getSelectionsByIds($selectionIds, $product);
629629

630-
if ($selections->getSize() !== count($selectionIds)) {
630+
if (count($selections->getItems()) !== count($selectionIds)) {
631631
throw new \Magento\Framework\Exception\LocalizedException(
632632
__('The options you selected are not available.')
633633
);

0 commit comments

Comments
 (0)