/** * Get the products to display for table. * * @return $this */ public function getLoadedProductCollection() { $mode = $this->getRequest()->getActionName(); $limit = $this->recommnededHelper->getDisplayLimitByMode($mode); $productIds = $this->recommnededHelper->getProductPushIds(); $productCollection = $this->productFactory->create()->getCollection()->addAttributeToSelect('*')->addAttributeToFilter('entity_id', ['in' => $productIds]); $productCollection->getSelect()->limit($limit); //important check the salable product in template return $productCollection; }