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)
1231
1231
protected function getQty ($ selection , $ qtys , $ selectionOptionId )
1232
1232
{
1233
1233
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
+ }
1236
1240
} else {
1237
1241
$ qty = (float )$ selection ->getSelectionQty () ? $ selection ->getSelectionQty () : 1 ;
1238
1242
}
You can’t perform that action at this time.
0 commit comments