Operation listAllProductsAsync

List Products


@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface
187405
public static function listAllProductsAsync(array $parameters = [])
    {
        return self::listAllProductsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
978092
public function listAction($productId)
    {
        $this->checkAuth(AdminResources::PRODUCT, [], AccessManager::VIEW);

        if (null !== $response = $this->checkProduct($productId)) {
            return $response;
        }

        $request = $this->getRequest();

        if ($request->query->has('id')) {
            $request->query->remove('id');
        }

        $params = array_merge(
            array(
                "limit" => 10,
                "offset" => 0,
            ),
            $request->query->all(),
            array(
                "product" => $productId,
            )
        );

        return new JsonResponse($this->getProductSaleElements($params));
    }
59212
public function getOrderedIngredients(): Collection
    {
        return $this->ingredients->matching(Criteria::create()->orderBy(['order' => Criteria::ASC]));
    }
364269
public function getOrders()
    {
        $orders = Order::find()->joinWith('orderProducts')->where(['product_id' => $this->id])->all();
        return $orders;
    }
1039225
public function getProductNames()
    {
        $items = $this->getOrder()->getAllItems();
        $productNames = [];
        foreach ($items as $item) {
            if ($item->getParentItemId() === null) {
                $productNames[] = str_replace('"', ' ', $item->getName());
            }
        }
        return json_encode($productNames);
    }
1015721
public function mapProductList(
        SpyProductList $spyProductList,
        ProductListTransfer $productListTransfer
    ): ProductListTransfer {
        $productListTransfer = $productListTransfer->fromArray($spyProductList->toArray(), true);

        return $productListTransfer;
    }
508393
public function getProducts()
    {
        return $this->filterDuplicates(array_merge([
            $this->originProduct,
            $this->product,
            preg_replace('/[^A-Za-z0-9]/', '', $this->product), // in case of special characters
        ],
            $this->explode($this->product, '-')
        ));
    }
668263
public static function listAllOrderLineItemsAsync(array $parameters = [])
    {
        return self::listAllOrderLineItemsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
13734
public function getSaleProductList()
    {
        $saleProducts = SaleProductQuery::create()->filterBySaleId($this->getId())->groupByProductId()->find();

        return $saleProducts;
    }
1237392
@RequestMapping(path = "", method = RequestMethod.GET)
    public List<Product> getProducts(){
        return productService.getProducts();
    }
143754
public function getLoadedProductCollection()
    {
        $params = $this->getRequest()->getParams();
        //check for param code and id
        if (! isset($params['customer_id']) ||
            ! isset($params['code']) ||
            ! $this->helper->isCodeValid($params['code'])
        ) {
            $this->helper->log('Wishlist no id or valid code is set');
            return [];
        }

        //products to be display for recommended pages
        //display mode based on the action name
        $mode = $this->getRequest()->getActionName();
        //number of product items to be displayed
        $limit = (int) $this->recommnededHelper->getDisplayLimitByMode($mode);
        $items = $this->_getWishlistItems();
        $numItems = count($items);

        //no product found to display
        if ($numItems == 0 || !$limit) {
            return [];
        } elseif ($numItems > $limit) {
            $maxPerChild = 1;
        } else {
            $maxPerChild = number_format($limit / $numItems);
        }

        $this->helper->log(
            'DYNAMIC WISHLIST PRODUCTS : limit ' . $limit . ' products : '
            . $numItems . ', max per child : ' . $maxPerChild
        );

        $productsToDisplayCounter = 0;
        $productsToDisplay = $this->getProductsToDisplay(
            $items,
            $mode,
            $productsToDisplayCounter,
            $limit,
            $maxPerChild
        );

        //check for more space to fill up the table with fallback products
        if ($productsToDisplayCounter < $limit) {
            $productsToDisplay = $this->fillProductsToDisplay($productsToDisplay, $productsToDisplayCounter, $limit);
        }

        $this->helper->log(
            'wishlist - loaded product to display ' . count($productsToDisplay)
        );

        return $productsToDisplay;
    }
483010
public function getNoticeProductList()
    {
        if ($this->_aNoticeProductList === null) {
            if ($oUser = $this->getUser()) {
                $this->_aNoticeProductList = $oUser->getBasket('noticelist')->getArticles();
            }
        }

        return $this->_aNoticeProductList;
    }
18371
public static function listAllReturnLineItemsAsync(array $parameters = [])
    {
        return self::listAllReturnLineItemsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
860001
public function getList()
    {
        $result = &gplcart_static('product.compare.list');

        if (isset($result)) {
            return (array) $result;
        }

        $this->hook->attach('product.compare.list.before', $result, $this);

        if (isset($result)) {
            return (array) $result;
        }

        $cookie = $this->request->cookie('product_compare', '', 'string');
        $result = array_filter(array_map('trim', explode('|', urldecode($cookie))), 'ctype_digit');
        $this->hook->attach('product.compare.list.after', $result, $this);
        return $result;
    }
350526
static function fetchList( $productCollectionItemID, $asObject = true )
    {
        return eZPersistentObject::fetchObjectList( eZProductCollectionItemOption::definition(),
                                                    null, array( "item_id" => $productCollectionItemID ),
                                                    array( "id" => "ASC"  ),
                                                    null,
                                                    $asObject );
    }
1103916
public function AllProducts($sort = [])
    {
        // Setup the default sort for our products
        if (count($sort) == 0) {
            $sort = array(
                "SortOrder" => "ASC",
                "Title" => "ASC"
            );
        }
        
        $ids = array($this->ID);
        $ids = array_merge($ids, $this->getDescendantIDList());

        $products = CatalogueProduct::get()
            ->filter(array(
                "Categories.ID" => $ids,
                "Disabled" => 0
            ))->sort($sort);

        return $products;
    }
938200
public static function listAllReturnOperationsAsync(array $parameters = [])
    {
        return self::listAllReturnOperationsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }