->
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
{ $query =
$this->connection->
createQueryBuilder();
if ($this->config->
get('calculateCheapestPriceWithMinPurchase'
)) { $query->
addSelect('COUNT(DISTINCT ROUND(prices.price * priceVariant.minpurchase, 2)) as priceCount'
);
} else { $query->
addSelect('COUNT(DISTINCT ROUND(prices.price, 2)) as priceCount'
);
}