public function getConfigurations(array
$articleIds, ShopContextInterface
$context) { $query =
$this->connection->
createQueryBuilder();
$query->
addSelect('product.id as array_key'
);
$query->
addSelect($this->fieldHelper->
getConfiguratorSetFields()) ->
addSelect($this->fieldHelper->
getConfiguratorGroupFields()) ->
addSelect($this->fieldHelper->
getConfiguratorOptionFields()) ;
$this->fieldHelper->
addConfiguratorGroupTranslation($query,
$context);
$this->fieldHelper->
addConfiguratorOptionTranslation($query,
$context);
$query->
from('s_articles', 'product'
);
$query->
innerJoin('product', 's_articles_details', 'variant', 'variant.articleID = product.id'
);
$query->
innerJoin('product', 's_article_configurator_sets', 'configuratorSet', 'configuratorSet.id = product.configurator_set_id'
);
$query->
innerJoin('configuratorSet', 's_article_configurator_set_group_relations', 'groupRelation', 'groupRelation.set_id = configuratorSet.id'
);
$query->
innerJoin('configuratorSet', 's_article_configurator_set_option_relations', 'optionRelation', 'optionRelation.set_id = configuratorSet.id'
);
$query->
innerJoin('groupRelation', 's_article_configurator_groups', 'configuratorGroup', 'configuratorGroup.id = groupRelation.group_id'
);
$query->
innerJoin('optionRelation', 's_article_configurator_options', 'configuratorOption', 'configuratorOption.id = optionRelation.option_id AND configuratorOption.group_id = configuratorGroup.id'
);
$query->
leftJoin('configuratorGroup', 's_article_configurator_groups_attributes', 'configuratorGroupAttribute', 'configuratorGroupAttribute.groupID = configuratorGroup.id'
);
$query->
leftJoin('configuratorOption', 's_article_configurator_options_attributes', 'configuratorOptionAttribute', 'configuratorOptionAttribute.optionID = configuratorOption.id'
);