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([
2525 } ,
2626 qty : 1 ,
2727 price : 0 ,
28+ priceType : '' ,
2829
2930 /**
3031 * Initialize
@@ -41,9 +42,10 @@ define([
4142
4243 if ( priceBox . priceBox ( 'option' ) &&
4344 priceBox . priceBox ( 'option' ) . prices &&
44- priceBox . priceBox ( 'option' ) . prices . finalPrice
45+ ( priceBox . priceBox ( 'option' ) . prices . finalPrice || priceBox . priceBox ( 'option' ) . prices . basePrice )
4546 ) {
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' ] ;
4749 }
4850
4951 $ ( this . qtyFieldSelector ) . on ( 'change' , this . _onQtyChange . bind ( this ) ) ;
@@ -74,7 +76,7 @@ define([
7476 * @private
7577 */
7678 _onPriceChange : function ( event , data ) {
77- this . price = data . finalPrice . amount ;
79+ this . price = data [ this . priceType ] [ ' amount' ] ;
7880 this . _updateAmount ( ) ;
7981 } ,
8082
You can’t perform that action at this time.
0 commit comments