source/Application/Controller/ArticleListController.php
protected function _collectMetaKeyword($keywords)
    {
        $maxTextLength = 60;
        $text = '';

        if (count($articleList = $this->getArticleList())) {
            $stringModifier = getStr();
            foreach ($articleList as $article) {
                /** @var \OxidEsales\Eshop\Application\Model\Article $article */
                $description = $stringModifier->strip_tags(trim($stringModifier->strtolower($article->getLongDescription()->value)));

                //removing dots from string (they are not cleaned up during general string cleanup)
                $description = $stringModifier->preg_replace("/\./", " ", $description);

                if ($stringModifier->strlen($description) > $maxTextLength) {
                    $midText = $stringModifier->substr($description, 0, $maxTextLength);
                    $description = $stringModifier->substr(
                        $midText,
                        0,
                        ($stringModifier->strlen($midText) - $stringModifier->strpos(strrev($midText), ' '))
                    );
                }
                if ($text) {
                    $text .= ', ';
                }
                $text .= $description;
            }
        }

        if (!$keywords) {
            $keywords = $this->_getCatPathString();
        }

        if ($keywords) {
            $text = "{$keywords}, {$text}";
        }

        return parent::_prepareMetaKeyword($text);
    }
protected function _collectMetaKeyword($keywords)
    {
        $maxTextLength = 60;
        $text = '';

        if (count($articleList = $this->getArticleList())) {
            $stringModifier = getStr();
            foreach ($articleList as $article) {
                /** @var \OxidEsales\Eshop\Application\Model\Article $article */
                $description = $stringModifier->strip_tags(trim($stringModifier->strtolower($article->getLongDescription()->value)));

                //removing dots from string (they are not cleaned up during general string cleanup)
                $description = $stringModifier->preg_replace("/\./", " ", $description);

                if ($stringModifier->strlen($description) > $maxTextLength) {
                    $midText = $stringModifier->substr($description, 0, $maxTextLength);
                    $description = $stringModifier->substr(
                        $midText,
                        0,
                        ($stringModifier->strlen($midText) - $stringModifier->strpos(strrev($midText), ' '))
                    );
                }
                if ($text) {
                    $text .= ', ';
                }
                $text .= $description;
            }
        }

        if (!$keywords) {
            $keywords = $this->_getCatPathString();
        }

        if ($keywords) {
            $text = "{$keywords}, {$text}";
        }

        return parent::_prepareMetaKeyword($text);
    }
protected function _collectMetaKeyword ( $ keywords ) { $ maxTextLength = 60 ; $ text = '' ; if ( count ( $ articleList = $ this -> getArticleList ( ) ) ) { $ stringModifier = getStr ( ) ; foreach ( $ articleList as $ article ) { /** @var \OxidEsales\Eshop\Application\Model\Article $article */ $ description = $ stringModifier -> strip_tags ( trim ( $ stringModifier -> strtolower ( $ article -> getLongDescription ( ) -> value ) ) ) ; //removing dots from string (they are not cleaned up during general string cleanup) $ description = $ stringModifier -> preg_replace ( "/\./" , " " , $ description ) ; if ( $ stringModifier -> strlen ( $ description ) > $ maxTextLength ) { $ midText = $ stringModifier -> substr ( $ description , 0 , $ maxTextLength ) ; $ description = $ stringModifier -> substr ( $ midText , 0 , ( $ stringModifier -> strlen ( $ midText ) - $ stringModifier -> strpos ( strrev ( $ midText ) , ' ' ) ) ) ; } if ( $ text ) { $ text .= ', ' ; } $ text .= $ description ; } } if ( ! $ keywords ) { $ keywords = $ this -> _getCatPathString ( ) ; } if ( $ keywords ) { $ text = "{$keywords}, {$text}" ; } return parent :: _prepareMetaKeyword ( $ text ) ; }
Creates a string of keyword filtered by the function prepareMetaDescription and without any duplicates
additional the admin defined strings are removed

@param string $keywords category path

@return string
Creates a string of keyword filtered by the function prepareMetaDescription and without any duplicates additional the admin defined strings are removed