Skip to content

Commit d2ec711

Browse files
MC-42198: Amount Attribute on Message disappear when user include Tax to Catalog Prices
- fix priceType for bundled products
1 parent 949089b commit d2ec711

File tree

1 file changed

+2
-3
lines changed
  • app/code/Magento/Paypal/view/frontend/web/js/view/amountProviders

1 file changed

+2
-3
lines changed

app/code/Magento/Paypal/view/frontend/web/js/view/amountProviders/product.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ define([
2020

2121
defaults: {
2222
priceBoxSelector: '.price-box',
23-
priceTypeSelector: '[data-price-type]',
2423
qtyFieldSelector: '#product_addtocart_form [name="qty"]',
2524
amount: null
2625
},
@@ -39,13 +38,13 @@ define([
3938
this._super();
4039

4140
priceBox = $(this.priceBoxSelector);
42-
this.priceType = $(this.priceTypeSelector, priceBox).data('priceType');
4341
priceBox.on('priceUpdated', this._onPriceChange.bind(this));
4442

4543
if (priceBox.priceBox('option') &&
4644
priceBox.priceBox('option').prices &&
47-
priceBox.priceBox('option').prices[this.priceType]
45+
(priceBox.priceBox('option').prices.finalPrice || priceBox.priceBox('option').prices.basePrice)
4846
) {
47+
this.priceType = priceBox.priceBox('option').prices.finalPrice ? 'finalPrice' : 'basePrice';
4948
this.price = priceBox.priceBox('option').prices[this.priceType]['amount'];
5049
}
5150

0 commit comments

Comments
 (0)