FIX: price impact of new combination is always a percentage even if the checkbox was unchecked #18397
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FIX cf. forum thread
When you create a new product combination, even if you leave the "Percentage variation" checkbox empty, the price impact is considered a percentage.
This is caused by the attribute
variation_price_percentage
ofProductCombination
being either an array or a boolean depending on whetherPRODUIT_MULTIPRICES
is used: it seems to me that in the lines I changed, it was set as an array when it should have been a boolean and vice versa.My changes fix the problem as it was described, however, I am not very familiar with the multiprice feature, so I’d gladly wait for someone more experienced to take a second look.