I'm looking to export a basic data feed from Magento CE 1.9. I understand that there is a free extension called Google Content API for Shopping. However, the product description only says it is compatible with 1.6 and 1.7.
Is there a version compatiable with 1.9?
Magento – Is Google Content API for Shopping compatible with CE 1.9
google apimagento-1.9
Related Solutions
I have developed an Google Shopping API v2 version based on the original Magento GoogleShopping module with some further improvements.
You can find it on GitHub: https://github.com/bluevisiontec/GoogleShoppingApi
It migrates the data from the original Magento GoogleShopping module. The only thing which is a bit more complicated is, that for OAuth2 a Google Developer Project hast to be created.
The blocks used in Rss creation are in app/code/core/Mage/Rss/Block
Just a guess, but maybe you want to modify the app/code/core/Mage/Rss/Block/Catalog/Category.php
file? There are several, take a look at the blocks and see which affects the feed you are concerned with.
I would create a simple module that rewrites the block you need to modify. A quick example, assuming that your company is called Yourcompany :
app/code/local/Yourcompany/Rss/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Yourcompany_Rss>
<version>0.1.0</version>
</Yourcompany_Rss>
</modules>
<global>
<blocks>
<yourcompany_rss>
<class>Yourcompany_Rss_Block</class>
</yourcompany_rss>
<rss>
<rewrite>
<catalog_category>Yourcompany_Rss_Block_Rss_Catalog_Category</catalog_category>
</rewrite>
</rss>
</blocks>
<helpers>
<yourcompany_rss>
<class>Yourcompany_Rss_Helper</class>
</yourcompany_rss>
</helpers>
</global>
</config>
app/code/local/Yourcompany/Rss/Block/Rss/Catalog/Category.php
class Yourcompany_Rss_Block_Rss_Catalog_Category extends Mage_Rss_Block_Catalog_Category {
protected function _toHtml()
{
$categoryId = $this->getRequest()->getParam('cid');
$storeId = $this->_getStoreId();
$rssObj = Mage::getModel('rss/rss');
if ($categoryId) {
$category = Mage::getModel('catalog/category')->load($categoryId);
if ($category && $category->getId()) {
$layer = Mage::getSingleton('catalog/layer')->setStore($storeId);
//want to load all products no matter anchor or not
$category->setIsAnchor(true);
$newurl = $category->getUrl();
$title = $category->getName();
$data = array('title' => $title,
'description' => $title,
'link' => $newurl,
'charset' => 'UTF-8',
);
$rssObj->_addHeader($data);
$_collection = $category->getCollection();
$_collection->addAttributeToSelect('url_key')
->addAttributeToSelect('name')
->addAttributeToSelect('is_anchor')
->addAttributeToFilter('is_active',1)
->addIdFilter($category->getChildren())
->load()
;
$productCollection = Mage::getModel('catalog/product')->getCollection();
$currentCategory = $layer->setCurrentCategory($category);
$layer->prepareProductCollection($productCollection);
$productCollection->addCountToCategories($_collection);
$category->getProductCollection()->setStoreId($storeId);
/*
only load latest 50 products
*/
$_productCollection = $currentCategory
->getProductCollection()
->addAttributeToSort('updated_at','desc')
->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds())
->setCurPage(1)
->setPageSize(50)
;
if ($_productCollection->getSize()>0) {
$args = array('rssObj' => $rssObj);
foreach ($_productCollection as $_product) {
$args['product'] = $_product;
$this->addNewItemXmlCallback($args);
}
}
}
}
return $rssObj->createRssXml();
}
}
In this case, if you modify the collection at ~ line 47
$_productCollection = $currentCategory
->getProductCollection()
to include the attributes you need you should have them in the feed.
You will also need your module declared in app/etc/modules, but your question was about rss, not custom modules ; )
So, take a look at the contents of app/code/core/Mage/Rss/Block/
, and rewrite the file that corresponds to your feed.
** I used a module name of Rss, that was totally arbitrary, you can name the module anything you want.
Best Answer
See That Extension is developed by the MAGENTO.
So they mention on site like support up to 1.7.
As per My experience if they the Module is not override any core functionality then It will work in 1.8 as well as 1.9.
you can try to install in local machine If everything is working fine then you can use for your live site :)