File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
app/code/Magento/Paypal/view/frontend/web/js/view/amountProviders Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ define([
20
20
21
21
defaults : {
22
22
priceBoxSelector : '.price-box' ,
23
- priceTypeSelector : '[data-price-type]' ,
24
23
qtyFieldSelector : '#product_addtocart_form [name="qty"]' ,
25
24
amount : null
26
25
} ,
@@ -39,13 +38,13 @@ define([
39
38
this . _super ( ) ;
40
39
41
40
priceBox = $ ( this . priceBoxSelector ) ;
42
- this . priceType = $ ( this . priceTypeSelector , priceBox ) . data ( 'priceType' ) ;
43
41
priceBox . on ( 'priceUpdated' , this . _onPriceChange . bind ( this ) ) ;
44
42
45
43
if ( priceBox . priceBox ( 'option' ) &&
46
44
priceBox . priceBox ( 'option' ) . prices &&
47
- priceBox . priceBox ( 'option' ) . prices [ this . priceType ]
45
+ ( priceBox . priceBox ( 'option' ) . prices . finalPrice || priceBox . priceBox ( 'option' ) . prices . basePrice )
48
46
) {
47
+ this . priceType = priceBox . priceBox ( 'option' ) . prices . finalPrice ? 'finalPrice' : 'basePrice' ;
49
48
this . price = priceBox . priceBox ( 'option' ) . prices [ this . priceType ] [ 'amount' ] ;
50
49
}
51
50
You can’t perform that action at this time.
0 commit comments