Author: Adam Piotrowski (adam@wellcommerce.org)
Inheritance: implements WellCommerce\Component\DataSet\DataSetInterface
 protected function getDataSetRequest(array $requestOptions = []) : DataSetRequestInterface
 {
     $request = parent::getDataSetRequest($requestOptions);
     $request->addCondition(new Eq('enabled', true));
     $request->addCondition(new Gt('products', 0));
     return $request;
 }
 protected function getQueryBuilder(DataSetRequestInterface $request) : QueryBuilder
 {
     $queryBuilder = parent::getQueryBuilder($request);
     $queryBuilder->leftJoin(CurrencyRate::class, 'currency_rate', Expr\Join::WITH, 'currency_rate.currencyFrom = product.sellPrice.currency AND currency_rate.currencyTo = :targetCurrency');
     $queryBuilder->setParameter('targetCurrency', $this->getRequestHelper()->getCurrentCurrency());
     $queryBuilder->setParameter('date', (new \DateTime())->setTime(0, 0, 1));
     return $queryBuilder;
 }
 protected function getQueryBuilder(DataSetRequestInterface $request) : QueryBuilder
 {
     $queryBuilder = parent::getQueryBuilder($request);
     $expression = $queryBuilder->expr()->eq('currency.enabled', ':enabled');
     $queryBuilder->andWhere($expression);
     $queryBuilder->setParameter('enabled', true);
     return $queryBuilder;
 }
 protected function getQueryBuilder(DataSetRequestInterface $request) : QueryBuilder
 {
     $queryBuilder = parent::getQueryBuilder($request);
     $expression = $queryBuilder->expr()->eq('order_product.order', ':order');
     $queryBuilder->andWhere($expression);
     $queryBuilder->setParameter('order', $this->provider->getCurrentOrderIdentifier());
     $queryBuilder->setParameter('date', (new \DateTime())->setTime(0, 0, 1));
     return $queryBuilder;
 }