$query ->
addSelect('attributeTranslations.objectdata as __attribute_translation'
) ->
leftJoin( 'product',
's_core_translations',
'attributeTranslations',
'attributeTranslations.objectkey = product.id AND attributeTranslations.objecttype = "article" AND attributeTranslations.objectlanguage = :language'
) ;
$query->
setParameter(':language',
$context->
getShop()->
getId());
if (!
$context->
getShop()->
getFallbackId() ||
$context->
getShop()->
getFallbackId() ===
$context->
getShop()->
getId()) { return;
} $query ->
addSelect('attributeTranslations_fallback.objectdata as __attribute_translation_fallback'
) ->
leftJoin( 'product',
's_core_translations',
'attributeTranslations_fallback',
'attributeTranslations_fallback.objectkey = product.id AND attributeTranslations_fallback.objecttype = "article" AND attributeTranslations_fallback.objectlanguage = :languageFallback'
) ;