-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: do not display "add to cart" button if product has no price #1657
Merged
Conversation
This file contains 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
shauke
force-pushed
the
bugfix/no_price_no_add_to_cart
branch
from
May 13, 2024 14:41
19b822f
to
77a48cc
Compare
shauke
added a commit
that referenced
this pull request
May 15, 2024
…y the product from the product context but the prices too (#1657) BREAKING CHANGES: works no longer with ProductView only but an Object with product and prices ... (migration notes)
shauke
added a commit
that referenced
this pull request
May 15, 2024
* handled via product context display properties
shauke
force-pushed
the
bugfix/no_price_no_add_to_cart
branch
from
May 15, 2024 10:00
5be354b
to
562e7f4
Compare
shauke
added a commit
that referenced
this pull request
May 16, 2024
…not only the product from the product context but the prices too (#1657)
shauke
added a commit
that referenced
this pull request
May 16, 2024
…y the product from the product context but the prices too (#1657) BREAKING CHANGES: The `ExternalDisplayPropertiesProvider` `setup` method was changed to no longer working with product data only but a combination of product and prices (see [Migrations / From 5.1 to 5.2](https://github.com/intershop/intershop-pwa/blob/develop/docs/guides/migrations.md#from-51-to-52) for more details).
* handled via product context display properties
* performance optimization to avoid unnecessary triggering of `loadProductParts` action for all products even if no parts are needed to be rendered * the actual REST request was filtered in the effect to be only done for retail sets or bundles but the action was triggered all the time
shauke
force-pushed
the
bugfix/no_price_no_add_to_cart
branch
from
May 16, 2024 13:20
b68ff21
to
a941bbe
Compare
dhhyi
approved these changes
May 16, 2024
shauke
pushed a commit
that referenced
this pull request
May 16, 2024
…y the product from the product context but the prices too (#1657) BREAKING CHANGES: The `ExternalDisplayPropertiesProvider` `setup` method was changed to no longer working with product data only but a combination of product and prices (see [Migrations / From 5.1 to 5.2](https://github.com/intershop/intershop-pwa/blob/develop/docs/guides/migrations.md#from-51-to-52) for more details).
shauke
added a commit
that referenced
this pull request
May 16, 2024
* handled via product context display properties
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.
PR Type
[x] Bugfix
What Is the Current Behavior?
On product detail pages and product listings products without a sale price display an "Add to Cart" button that will result in an error message regarding the failed action because of the missing price.
What Is the New Behavior?
Products without a sale price no longer have an "Add to Cart" button.
Does this PR Introduce a Breaking Change?
The
ExternalDisplayPropertiesProvider
setup
notation was changed from providing only theproduct
context to providing a combined{ product, prices }
context object to be able to depend the visibility of the add to basket button on an existing price.For that reason any custom
ContextDisplayPropertiesService
that implements theExternalDisplayPropertiesProvider
needs to be adapted accordingly.[x] Yes
Other Information
AB#96517