Ejemplo n.º 1
0
 protected function getListQuery()
 {
     $builder = parent::getListQuery();
     $builder->leftJoin('product.tax', 'tax');
     $builder->addSelect(array('tax'));
     return $builder;
 }
 /**
  * {@inheritdoc}
  */
 protected function getListQuery()
 {
     $builder = parent::getListQuery();
     if ($this->addRuleConstraint) {
         $ids = Shopware()->Models()->getDBALQueryBuilder()->select('DISTINCT rule.category_id')->from('s_plugin_swag_default_sort_rule', 'rule')->execute()->fetchAll(PDO::FETCH_COLUMN, 0);
         $builder->where('category.id IN (:ruleCategoryIds)')->setParameter(':ruleCategoryIds', $ids, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY);
     }
     $builder->orderBy('category.parentId')->addOrderBy('category.position');
     return $builder;
 }