File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
app/code/Magento/Bundle/Block/Catalog/Product/View/Type Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,18 @@ public function getJsonConfig()
193
193
$ options [$ optionId ]['selections ' ][$ configValue ]['qty ' ] = $ configQty ;
194
194
}
195
195
}
196
+
197
+
198
+ $ preConfiguredQtys = $ preConfiguredValues ->getData ("bundle_option_qty/ $ {optionId}" ) ?? [];
199
+ $ selections = $ options [$ optionId ]['selections ' ];
200
+ array_walk ($ selections , function (&$ selection , $ selectionId ) use ($ preConfiguredQtys ) {
201
+ if (is_array ($ preConfiguredQtys ) && isset ($ preConfiguredQtys [$ selectionId ])) {
202
+ $ selection ['qty ' ] = $ preConfiguredQtys [$ selectionId ];
203
+ } else if ((int )$ preConfiguredQtys > 0 ) {
204
+ $ selection ['qty ' ] = $ preConfiguredQtys ;
205
+ }
206
+ });
207
+ $ options [$ optionId ]['selections ' ] = $ selections ;
196
208
}
197
209
$ position ++;
198
210
}
You can’t perform that action at this time.
0 commit comments