return $result;
} /**
* @param int[] $ids
*/
private function getQuery(array
$ids, ShopContextInterface
$context): QueryBuilder
{ $query =
$this->connection->
createQueryBuilder();
$query->
select('variants.ordernumber as number'
) ->
addSelect($this->fieldHelper->
getConfiguratorGroupFields()) ->
addSelect($this->fieldHelper->
getConfiguratorOptionFields());
$query->
from('s_article_configurator_option_relations', 'relations'
) ->
innerJoin('relations', 's_articles_details', 'variants', 'variants.id = relations.article_id'
) ->
innerJoin('relations', 's_article_configurator_options', 'configuratorOption', 'configuratorOption.id = relations.option_id'
) ->
innerJoin('configuratorOption', 's_article_configurator_groups', 'configuratorGroup', 'configuratorGroup.id = configuratorOption.group_id'
) ->
leftJoin('configuratorGroup', 's_article_configurator_groups_attributes', 'configuratorGroupAttribute', 'configuratorGroupAttribute.groupID = configuratorGroup.id'
) ->
leftJoin('configuratorOption', 's_article_configurator_options_attributes', 'configuratorOptionAttribute', 'configuratorOptionAttribute.optionID = configuratorOption.id'
) ->
where('relations.article_id IN (:ids)'
) ->
addOrderBy('configuratorGroup.position'
) ->
addOrderBy('configuratorGroup.id'
)