intershop / intershop-pwa

The Intershop PWA is an Angular based progressive web app storefront for the Intershop Commerce Platform.
https://www.intershop.com/progressive-web-app
MIT License
159 stars 85 forks source link

fix: do not display "add to cart" button if product has no price #1657

Closed shauke closed 6 months ago

shauke commented 6 months ago

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 the product 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 the ExternalDisplayPropertiesProvider needs to be adapted accordingly.

[x] Yes

Other Information

AB#96517