File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/code/Magento/Paypal/view/frontend/web/js/view/amountProviders Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ define([
25
25
} ,
26
26
qty : 1 ,
27
27
price : 0 ,
28
+ priceType : '' ,
28
29
29
30
/**
30
31
* Initialize
@@ -41,9 +42,10 @@ define([
41
42
42
43
if ( priceBox . priceBox ( 'option' ) &&
43
44
priceBox . priceBox ( 'option' ) . prices &&
44
- priceBox . priceBox ( 'option' ) . prices . finalPrice
45
+ ( priceBox . priceBox ( 'option' ) . prices . finalPrice || priceBox . priceBox ( 'option' ) . prices . basePrice )
45
46
) {
46
- this . price = priceBox . priceBox ( 'option' ) . prices . finalPrice . amount ;
47
+ this . priceType = priceBox . priceBox ( 'option' ) . prices . finalPrice ? 'finalPrice' : 'basePrice' ;
48
+ this . price = priceBox . priceBox ( 'option' ) . prices [ this . priceType ] [ 'amount' ] ;
47
49
}
48
50
49
51
$ ( this . qtyFieldSelector ) . on ( 'change' , this . _onQtyChange . bind ( this ) ) ;
@@ -74,7 +76,7 @@ define([
74
76
* @private
75
77
*/
76
78
_onPriceChange : function ( event , data ) {
77
- this . price = data . finalPrice . amount ;
79
+ this . price = data [ this . priceType ] [ ' amount' ] ;
78
80
this . _updateAmount ( ) ;
79
81
} ,
80
82
You can’t perform that action at this time.
0 commit comments