Jump to content

category description plain text


Recommended Posts


is there a posibility to change a category description to plain text? Now when I add some text then it is added to <p></p>. I need this to xml products export(category description is exported in html tags).





Link to comment
Share on other sites

I have module to generate several xml files with products(for price comparison sites)... and in one of these I need to change category name to category description. I will show you a fragment of code:



private function generateCategoryPath() {
        $Categories = self::getCategories($this->_id_lang, false, false, 'AND c.`id_category` > 1');

        $Array = array();
        foreach ($Categories as $c) {
            $Array[$c['id_category']] = $c;
        foreach ($Array as $c) {
            $cParentId = $c['id_parent'];
            $pp = $c['name'];

            while ($cParentId) {
                if (isset($Array[$cParentId]['id_parent'])) {
                    $pp = $Array[$cParentId]['name'] . "/" . $pp;
                    $cParentId = $Array[$cParentId]['id_parent'];
                } else
                    $cParentId = 0;
            $Array[$c['id_category']]['path'] = $pp;


this is original code, when I change "name" to "desc", then the description is shown but with html tags.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...