public function getAllVisibleCategoriesByDomainId(int ): array { ->visibleCategoriesCache[] = ->categoryRepository->getAllVisibleByDomainId(); } return ->visibleCategoriesCache[]; } /** * @param \Shopsys\FrameworkBundle\Model\Category\Category[] * @param \Shopsys\FrameworkBundle\Model\Pricing\Group\PricingGroup * @param int * @return int[] */ public function getListableProductCountsIndexedByCategoryId( array , PricingGroup , ): array { if (count() === 0) { return []; } = []; foreach ( as ) { [->getId()] = 0; } // Místo pole objektů posíláme pole INT - Doctrine neprovede expand na N parametrů = array_map(static fn() => ->getId(), ); = ->productRepository->getAllListableQueryBuilder(, ) ->join( ProductCategoryDomain::class, 'pcd', Join::WITH, 'pcd.product = p AND pcd.domainId = :domainId AND pcd.category IN (:categoryIds)' ) ->select('IDENTITY(pcd.category) AS categoryId, COUNT(p) AS productCount') ->setParameter('categoryIds', ) ->setParameter('domainId', ) ->groupBy('pcd.category') ->resetDQLPart('orderBy'); foreach (->getQuery()->getArrayResult() as ) { [['categoryId']] = ['productCount']; } return ; }
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.