->
leftJoin('variant', 's_articles_attributes', 'productAttribute', 'productAttribute.articledetailsID = variant.id'
) ->
leftJoin('product', 's_articles_supplier_attributes', 'manufacturerAttribute', 'manufacturerAttribute.supplierID = product.supplierID'
) ->
leftJoin('product', 's_articles_top_seller_ro', 'topSeller', 'topSeller.article_id = product.id'
) ->
leftJoin('variant', 's_articles_esd', 'esd', 'esd.articledetailsID = variant.id'
) ->
leftJoin('esd', 's_articles_esd_attributes', 'esdAttribute', 'esdAttribute.esdID = esd.id'
) ->
leftJoin('manufacturer', 's_media', 'manufacturerMedia', 'manufacturerMedia.path = manufacturer.img'
) ->
where('variant.ordernumber IN (:numbers)'
) ->
andWhere('variant.active = 1'
) ->
andWhere('product.active = 1'
) ->
setParameter(':numbers',
$numbers, Connection::PARAM_STR_ARRAY
);
if ($this->config->
get('hideNoInstock'
)) { $query->
andHaving('__product_has_available_variants >= 1'
);
} $this->fieldHelper->
addProductTranslation($query,
$context);
$this->fieldHelper->
addVariantTranslation($query,
$context);
$this->fieldHelper->
addManufacturerTranslation($query,
$context);
$this->fieldHelper->
addUnitTranslation($query,
$context);
$this->fieldHelper->
addEsdTranslation($query,
$context);
return $query;
} private function getPriceCountQuery(string
$key): QueryBuilder
{