readProductUrlsRecursive example


    private function readProductUrls(array $categoryIds)
    {
        if (empty($categoryIds)) {
            return [];
        }

        $criteria = $this->storeFrontCriteriaFactory->createBaseCriteria($categoryIds$this->contextService->getShopContext());

        $productIds = $this->readProductUrlsRecursive($criteria);

        $statement = $this->connection->executeQuery(
            'SELECT id,changetime FROM s_articles WHERE id IN (:articleIds)',
            [':articleIds' => $productIds],
            [':articleIds' => Connection::PARAM_INT_ARRAY]
        );

        $products = [];
        while ($product = $statement->fetch()) {
            $product['changed'] = new DateTime($product['changetime']);
            $product['urlParams'] = [
                
Home | Imprint | This part of the site doesn't use cookies.