File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
app/code/Magento/Paypal/view/frontend/web/js/view/amountProviders Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,9 @@ define([
96
96
payLater = registry . get ( this . parentName ) ;
97
97
98
98
for ( productId in this . priceInfo ) {
99
- amount += this . priceInfo [ productId ] . price * this . priceInfo [ productId ] . qty ;
99
+ if ( this . priceInfo . hasOwnProperty ( productId ) ) {
100
+ amount += this . priceInfo [ productId ] . price * this . priceInfo [ productId ] . qty ;
101
+ }
100
102
}
101
103
102
104
payLater . amount ( amount ) ;
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ define([
45
45
( priceBox . priceBox ( 'option' ) . prices . finalPrice || priceBox . priceBox ( 'option' ) . prices . basePrice )
46
46
) {
47
47
this . priceType = priceBox . priceBox ( 'option' ) . prices . finalPrice ? 'finalPrice' : 'basePrice' ;
48
- this . price = priceBox . priceBox ( 'option' ) . prices [ this . priceType ] [ ' amount' ] ;
48
+ this . price = priceBox . priceBox ( 'option' ) . prices [ this . priceType ] . amount ;
49
49
}
50
50
51
51
$ ( this . qtyFieldSelector ) . on ( 'change' , this . _onQtyChange . bind ( this ) ) ;
@@ -76,7 +76,7 @@ define([
76
76
* @private
77
77
*/
78
78
_onPriceChange : function ( event , data ) {
79
- this . price = data [ this . priceType ] [ ' amount' ] ;
79
+ this . price = data [ this . priceType ] . amount ;
80
80
this . _updateAmount ( ) ;
81
81
} ,
82
82
You can’t perform that action at this time.
0 commit comments