File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
ConfigurableProduct/view/frontend/web/js
Swatches/view/frontend/web/js Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -499,6 +499,7 @@ define([
499
499
optionFinalPrice = parseFloat ( optionPrices [ allowedProduct ] . finalPrice . amount ) ;
500
500
optionPriceDiff = optionFinalPrice - basePrice ;
501
501
}
502
+
502
503
if ( optionPriceDiff !== 0 ) {
503
504
prices = { } ;
504
505
priceValue = this . _calculatePriceDifference ( allowedProduct ) ;
@@ -530,6 +531,7 @@ define([
530
531
optionMinPrice = optionFinalPrice ;
531
532
product = allowedProduct ;
532
533
}
534
+
533
535
if ( optionFinalPrice < optionMinPrice ) {
534
536
product = allowedProduct ;
535
537
}
@@ -550,6 +552,7 @@ define([
550
552
newPrices = this . options . spConfig . optionPrices [ allowedProduct ] ;
551
553
552
554
_ . each ( displayPrices , function ( price , code ) {
555
+
553
556
if ( newPrices [ code ] ) {
554
557
displayPrices [ code ] . amount = newPrices [ code ] . amount - displayPrices [ code ] . amount ;
555
558
}
Original file line number Diff line number Diff line change @@ -976,10 +976,12 @@ define([
976
976
allowedProduct = this . _getAllowedProductWithMinPrice ( this . _CalcProducts ( ) ) ;
977
977
optionPrices = this . options . jsonConfig . optionPrices ;
978
978
basePrice = parseFloat ( this . options . jsonConfig . prices . basePrice . amount ) ;
979
+
979
980
if ( ! _ . isEmpty ( allowedProduct ) ) {
980
981
optionFinalPrice = parseFloat ( optionPrices [ allowedProduct ] . finalPrice . amount ) ;
981
982
optionPriceDiff = optionFinalPrice - basePrice ;
982
983
}
984
+
983
985
if ( optionPriceDiff !== 0 ) {
984
986
newPrices = this . options . jsonConfig . optionPrices [ allowedProduct ] ;
985
987
} else {
@@ -988,6 +990,7 @@ define([
988
990
}
989
991
990
992
_ . each ( displayPrices , function ( price , code ) {
993
+
991
994
if ( newPrices [ code ] ) {
992
995
displayPrices [ code ] . amount = newPrices [ code ] . amount - displayPrices [ code ] . amount ;
993
996
}
@@ -1015,6 +1018,7 @@ define([
1015
1018
optionMinPrice = optionFinalPrice ;
1016
1019
product = allowedProduct ;
1017
1020
}
1021
+
1018
1022
if ( optionFinalPrice < optionMinPrice ) {
1019
1023
product = allowedProduct ;
1020
1024
}
You can’t perform that action at this time.
0 commit comments