/** * {@inheritdoc} */ public function generateCondition(ConditionInterface $condition, QueryBuilder $query, ShopContextInterface $context) { $tableKey = $condition->getName(); $where = []; /** @var PropertyCondition $condition */ foreach ($condition->getValueIds() as $valueId) { $valueKey = $tableKey . '_' . $valueId; $where[] = $tableKey . '.valueID = :' . $valueKey; $query->setParameter(':' . $valueKey, $valueId); } $where = implode(' OR ', $where); $query->innerJoin('product', 's_filter_articles', $tableKey, 'product.id = ' . $tableKey . '.articleID AND (' . $where . ')'); }