Skip to content

Commit 7f85c4b

Browse files
ENGCOM-1554: [Backport 2.1] Fix for displaying a negative price for a custom option #15203
- Merge Pull Request #15203 from dverkade/magento2:2.1-Fix-negative-value-for-custom-option - Merged commits: 1. c224ad0
2 parents f4aec5f + c224ad0 commit 7f85c4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/code/Magento/Catalog/view/base/web/js/price-options.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ define([
1919
optionConfig: {},
2020
optionHandlers: {},
2121
optionTemplate: '<%= data.label %>' +
22-
'<% if (data.finalPrice.value) { %>' +
22+
'<% if (data.finalPrice.value > 0) { %>' +
2323
' +<%- data.finalPrice.formatted %>' +
24+
'<% } else if (data.finalPrice.value < 0) { %>' +
25+
' <%- data.finalPrice.formatted %>' +
2426
'<% } %>',
2527
controlContainer: 'dd'
2628
};

0 commit comments

Comments
 (0)