/**
* {@inheritdoc}
*/
public function createProductQuery(Criteria
$criteria, ShopContextInterface
$context) { $query =
$this->
createQueryWithSorting($criteria,
$context);
$select =
$query->
getQueryPart('select'
);
if ($criteria->
fetchCount()) { $query->
select([ 'SQL_CALC_FOUND_ROWS product.id as __product_id',
'variant.id as __variant_id',
'variant.ordernumber as __variant_ordernumber',
]);
} else { $query->
select([ 'product.id as __product_id',
'variant.id as __variant_id',
'variant.ordernumber as __variant_ordernumber',
]);
}