Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Editing RSS - changing description to short_description
 
Kalamingo
Member
 
Total Posts:  36
Joined:  2009-09-09
 

How do i edit the RSS feed, so that it displays product information from “short_description” rather than from the “description” attribute?
I tried fiddling with the coding, but i kept getting errors.

thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
webboy
Jr. Member
 
Total Posts:  10
Joined:  2010-01-15
 

Line 113 of the file /app/ code / core / Mage / Rss / Block / Catalog / Category.php

from
‘<td style="text-decoration:none;">’.$_product->getDescription().

You could change

‘<td style="text-decoration:none;">’.$_product->getShortDescription()

 
Magento Community Magento Community
Magento Community
Magento Community
 
Alex Leonard
Member
 
Total Posts:  43
Joined:  2010-02-03
 

Is there a way to do that without hacking the core?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Zigsby
Jr. Member
 
Total Posts:  1
Joined:  2010-07-29
 

That works but what if we want to call a custom attribute in the rss instead of the “ShortDescription”.  Say I have a different discription I want to display to my RSS feed...for example my attribute is rss_descriptoin.  Can we call that to the rss instead of the Description or ShorDescription?

I am attempting with no luck.  I have added the ‘rss_description’ in line 75

->addAttributeToSelect(array('name''short_description''description''price''thumbnail''rss_description'), 'inner')

and put it within the rss table

$description '<table><tr>'.
            
'<td><a href="'.$product->getProductUrl().'"><img src="'$this->helper('catalog/image')->init($product'thumbnail')->resize(7575) .'" border="0" align="left" height="75" width="75"></a></td>'.
            
'<td  style="text-decoration:none;">'.$product->getAttributeText('rss_description');

        if (
$allowedPriceInRss{
            $description 
.= $this->getPriceHtml($product,true);
        
}

        $description 
.= '</td>'.
            
'</tr></table>';

No such luck so far...but any help would be greatly appreciated.

Chris

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top