File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
app/code/Magento/Bundle/view/base/web/js Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ define([
22
22
' +<%- finalPrice.formatted %>' +
23
23
'<% } %>' ,
24
24
controlContainer : 'dd' , // should be eliminated
25
- priceFormat : { }
25
+ priceFormat : { } ,
26
+ isFixedPrice : false
26
27
} ;
27
28
28
29
$ . widget ( 'mage.priceBundle' , {
@@ -116,14 +117,15 @@ define([
116
117
*/
117
118
_applyQtyFix : function applyQtyFix ( ) {
118
119
var config = this . options . optionConfig ;
120
+ if ( ! config . isFixedPrice ) {
121
+ return ; // Fix touches only Bundle with Fixed price.
122
+ }
119
123
_ . each ( config . options , function ( option ) {
120
124
_ . each ( option . selections , function ( item ) {
121
- if ( item . priceType === '0' ) {
122
- if ( item . qty && item . qty !== 1 ) {
123
- _ . each ( item . prices , function ( price ) {
124
- price . amount = price . amount / item . qty ;
125
- } ) ;
126
- }
125
+ if ( item . qty && item . qty !== 1 ) {
126
+ _ . each ( item . prices , function ( price ) {
127
+ price . amount = price . amount / item . qty ;
128
+ } ) ;
127
129
}
128
130
} ) ;
129
131
} ) ;
You can’t perform that action at this time.
0 commit comments