Skip to content

Commit

Permalink
In case something wrong with underlying products
Browse files Browse the repository at this point in the history
call to a member function getAmount() on boolean in vendor/magento/module-bundle/Pricing/Adjustment/Calculator.php on line 315

Fix this issue
  • Loading branch information
Will-I4M authored Oct 17, 2016
1 parent bc9df94 commit aec7a82
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,11 @@ protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct,

foreach ($selectionPriceList as $selectionPrice) {
++$i;
$amountList[$i]['amount'] = $selectionPrice->getAmount();
// always honor the quantity given
$amountList[$i]['quantity'] = $selectionPrice->getQuantity();
if ($selectionPrice) {
$amountList[$i]['amount'] = $selectionPrice->getAmount();
// always honor the quantity given
$amountList[$i]['quantity'] = $selectionPrice->getQuantity();
}
}

/** @var Store $store */
Expand Down

0 comments on commit aec7a82

Please sign in to comment.