$sql_add_join[] = "
LEFT JOIN s_core_translations as ta
ON ta.objectkey=a.id AND ta.objecttype='article' AND ta.objectlanguage=
$sql_isocode
LEFT JOIN s_core_translations as td
ON td.objectkey=d.id AND td.objecttype='variant' AND td.objectlanguage=
$sql_isocode
";
$sql_add_select[] = 'ta.objectdata as article_translation';
$sql_add_select[] = 'td.objectdata as detail_translation';
// Read the fallback for the case the translation is not going to be set
$fallbackId =
$this->shop->
getFallback() ?
$this->shop->
getFallback()->
getId() : null;
if (!
empty($fallbackId)) { $sqlFallbackLanguageId =
$this->db->
quote($fallbackId);
$sql_add_join[] = "
LEFT JOIN s_core_translations as taf
ON taf.objectkey=a.id AND taf.objecttype='article' AND taf.objectlanguage=
$sqlFallbackLanguageId
LEFT JOIN s_core_translations as tdf
ON tdf.objectkey=d.id AND tdf.objecttype='variant' AND tdf.objectlanguage=
$sqlFallbackLanguageId
";
$sql_add_select[] = 'taf.objectdata as article_translation_fallback';
$sql_add_select[] = 'tdf.objectdata as detail_translation_fallback';
}