Getting streams from product returns an empty collection with some dynamic product group rules

Viewed 55

I've created a decoration which enables the automatic loading of streams for products. This makes me able to access the Dynamic Product groups in the storefront, but I'm running into some problems when using some rules. Everything works fine when selecting a specific product or when using the productNumber equals number rule, but when I try to select products based on property values it always returns an empty collection. It might be because I'm using products with variants even tho I'm inheriting the properties. The variants do show up in the Preview screen for a product group.

Thread in which I've added my decoration: Is it possible to enable the automatic loading of an association for products?

Edit:
I've created 2 decorations. One for the EntityRepositoryInterface and the other for the SalesChannelRepositoryInterface. Both contain a search function in which I've added the ->addAssociation('streams'). The result is now not null anymore, but an empty collection in cases where the stream (dynamic product group) rule uses properties as described in the thread above. When using a specific category within the rule to filter on it does show a stream, so It's a specific problem with variant properties (probably more inherited product data).

0 Answers
Related