peterlh
peterlh

Reputation: 71

Shopware 6 - prices modified with decorator does not function correctly in product price filter

I used the example AbstractProductPriceCalculator from the developer page, to dynamically modify a product's price from whatever was entered in Admin into say 1EUR. This all works just fine. The product sorting Price asc/desc works too.

https://developer.shopware.com/docs/guides/plugins/plugins/checkout/cart/customize-price-calculation

But the price range filter on default Storefront does not work, this still think the product has the price that was entered in Admin - not the decorated price.

Is there another way to dynamically set prices such they function with the filters too?

Any hints appreciated

enter image description here

Upvotes: 2

Views: 529

Answers (1)

aragon999
aragon999

Reputation: 126

The price filter is generated from SalesChannelProductEntity::cheapestPrice, so make sure to also change this, as indicated in the docs.

Upvotes: 2

Related Questions