/**
* {@inheritdoc}
*
* @throws Exception
*/
public function createQuery(Criteria
$criteria, ShopContextInterface
$context) { $query =
$this->
createQueryBuilder();
$this->
prepareHandlers($criteria);
$query->
from('s_articles', 'product'
);
if ($criteria->
hasConditionOfClass(VariantCondition::
class)) { $query->
innerJoin( 'product',
's_articles_details',
'variant',
'variant.articleID = product.id
AND variant.active = 1
AND product.active = 1'
);