Ignore discarded prices on Variant#default_price#4108
Closed
waiting-for-dev wants to merge 1 commit intosolidusio:masterfrom
Closed
Ignore discarded prices on Variant#default_price#4108waiting-for-dev wants to merge 1 commit intosolidusio:masterfrom
waiting-for-dev wants to merge 1 commit intosolidusio:masterfrom
Conversation
Fixes bug where discarded prices were taken into account in order to tell the default price for a variant. The rationale behind the previous behavior was to be able to render a price when discarded products are included in the backend products listing page (see 'Show deleted' checkbox near the top-right edge). It was introduced in commit 87cef09. However, this logic was incorrect in two ways: - It affected non-discarded variants, where we don't want to consider discarded prices. - Even for discarded variants, it could lead to display the wrong information. As all prices get discarded when a variant is discarded, there's no guarantee that the one that is rendered was the previously considered as the default. The list of products on the backend will render the price field for discarded products as blank. In case we want to track default prices, we should add a flag to uniquely identify them.
f5d8f00 to
e99acb3
Compare
Contributor
Author
|
We're closing it as we'll be revisiting this stuff in the context of services objects. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fixes bug where discarded prices were taken into account in order to
tell the default price for a variant.
The rationale behind the previous behavior was to be able to render a
price when discarded products are included in the backend products
listing page (see 'Show deleted' checkbox near the top-right edge). It
was introduced in commit 87cef09.
However, this logic was incorrect in two ways:
discarded prices.
information. As all prices get discarded when a variant is discarded,
there's no guarantee that the one that is rendered was the previously
considered as the default.
The list of products on the backend will render the price field for
discarded products as blank. In case we want to track default prices, we
should add a flag to uniquely identify them.
Extracted from #3994
Checklist: