Skip to content

Commit 1d2aeac

Browse files
author
Vladyslav Shcherbyna
committed
MAGETWO-34866: Wrong price displayed on product page of bundle product
1 parent 0c03986 commit 1d2aeac

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

app/code/Magento/Bundle/view/base/web/js/price-bundle.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ define([
2222
' +<%- finalPrice.formatted %>' +
2323
'<% } %>',
2424
controlContainer: 'dd', // should be eliminated
25-
priceFormat: {}
25+
priceFormat: {},
26+
isFixedPrice: false
2627
};
2728

2829
$.widget('mage.priceBundle', {
@@ -116,14 +117,15 @@ define([
116117
*/
117118
_applyQtyFix: function applyQtyFix() {
118119
var config = this.options.optionConfig;
120+
if (!config.isFixedPrice) {
121+
return; // Fix touches only Bundle with Fixed price.
122+
}
119123
_.each(config.options, function (option) {
120124
_.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+
});
127129
}
128130
});
129131
});

0 commit comments

Comments
 (0)