Helper/Recommended.php
public function getDisplayLimitByMode($mode)
    {
        $result = 0;

        switch ($mode) {
            case 'related':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_RELATED_PRODUCTS_ITEMS
                );
                break;
            case 'upsell':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_UPSELL_PRODUCTS_ITEMS
                );
                break;
            case 'crosssell':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_CROSSSELL_PRODUCTS_ITEMS
                );
                break;
            case 'bestsellers':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_BESTSELLER_PRODUCT_ITEMS
                );
                break;
            case 'mostviewed':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_MOSTVIEWED_PRODUCT_ITEMS
                );
                break;
            case 'recentlyviewed':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_RECENTLYVIEWED_PRODUCT_ITEMS
                );
                break;
            case 'push':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_PRODUCTPUSH_DISPLAY_ITEMS
                );
        }

        return $result;
    }
public function getDisplayLimitByMode($mode)
    {
        $result = 0;

        switch ($mode) {
            case 'related':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_RELATED_PRODUCTS_ITEMS
                );
                break;
            case 'upsell':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_UPSELL_PRODUCTS_ITEMS
                );
                break;
            case 'crosssell':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_CROSSSELL_PRODUCTS_ITEMS
                );
                break;
            case 'bestsellers':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_BESTSELLER_PRODUCT_ITEMS
                );
                break;
            case 'mostviewed':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_MOSTVIEWED_PRODUCT_ITEMS
                );
                break;
            case 'recentlyviewed':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_RECENTLYVIEWED_PRODUCT_ITEMS
                );
                break;
            case 'push':
                $result = $this->scopeConfig->getValue(
                    self::XML_PATH_PRODUCTPUSH_DISPLAY_ITEMS
                );
        }

        return $result;
    }
public function getDisplayLimitByMode ( $ mode ) { $ result = 0 ; switch ( $ mode ) { case 'related' : $ result = $ this -> scopeConfig -> getValue ( self :: XML_PATH_RELATED_PRODUCTS_ITEMS ) ; break ; case 'upsell' : $ result = $ this -> scopeConfig -> getValue ( self :: XML_PATH_UPSELL_PRODUCTS_ITEMS ) ; break ; case 'crosssell' : $ result = $ this -> scopeConfig -> getValue ( self :: XML_PATH_CROSSSELL_PRODUCTS_ITEMS ) ; break ; case 'bestsellers' : $ result = $ this -> scopeConfig -> getValue ( self :: XML_PATH_BESTSELLER_PRODUCT_ITEMS ) ; break ; case 'mostviewed' : $ result = $ this -> scopeConfig -> getValue ( self :: XML_PATH_MOSTVIEWED_PRODUCT_ITEMS ) ; break ; case 'recentlyviewed' : $ result = $ this -> scopeConfig -> getValue ( self :: XML_PATH_RECENTLYVIEWED_PRODUCT_ITEMS ) ; break ; case 'push' : $ result = $ this -> scopeConfig -> getValue ( self :: XML_PATH_PRODUCTPUSH_DISPLAY_ITEMS ) ; } return $ result ; }
Limit of products displayed.

@param string $mode

@return int|mixed
Limit of products displayed .