【发布时间】:2022-08-04 02:05:28
【问题描述】:
我正在使用product repository 的装饰,通过添加streams(动态产品组)来扩展以下功能。
public function search(Criteria $criteria, SalesChannelContext $salesChannelContext): EntitySearchResult
{
$criteria->addAssociation(\'streams\');
return $this->decorated->search($criteria, $salesChannelContext);
}
这似乎不适用于变体,即使它们继承了属性,基于这些属性的动态产品组似乎都没有加载。 propertyIds 确实为产品加载,因此已添加属性(在 Shopware 中是默认设置)。
-
尝试加载
properties时也会出现同样的问题。即使变体从其父代继承它们,它也始终保持null。
标签: collections associations decorator shopware entities