File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
app/code/Magento/Bundle/Model/Product Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1231,8 +1231,12 @@ public function getIdentities(\Magento\Catalog\Model\Product $product)
12311231 protected function getQty ($ selection , $ qtys , $ selectionOptionId )
12321232 {
12331233 if ($ selection ->getSelectionCanChangeQty () && isset ($ qtys [$ selectionOptionId ])) {
1234- $ selectionQty = $ qtys [$ selectionOptionId ][$ selection ->getSelectionId ()];
1235- $ qty = (float )$ selectionQty > 0 ? $ selectionQty : 1 ;
1234+ if (is_array ($ qtys [$ selectionOptionId ]) && isset ($ qtys [$ selectionOptionId ][$ selection ->getSelectionId ()])) {
1235+ $ selectionQty = $ qtys [$ selectionOptionId ][$ selection ->getSelectionId ()];
1236+ $ qty = (float )$ selectionQty > 0 ? $ selectionQty : 1 ;
1237+ } else {
1238+ $ qty = (float )$ qtys [$ selectionOptionId ] > 0 ? $ qtys [$ selectionOptionId ] : 1 ;
1239+ }
12361240 } else {
12371241 $ qty = (float )$ selection ->getSelectionQty () ? $ selection ->getSelectionQty () : 1 ;
12381242 }
You can’t perform that action at this time.
0 commit comments