This is a very basic Google Shopping extension that requires basic Magento development skills to customise - there is little in the way of CMS. The module is designed to be as stripped back as possible to allow flexibility.
Magento Community Edition 1.4 to 1.9
- Unpack the extension ZIP file in your Magento root directory
- Clear the Magento cache: System > Cache Management
- Log out the Magento admin and log back in to clear the ACL list
- Recompile if you are using the Magento Compiler
Configure by going to: System > Configuration > Creare > Google Shopping > Settings
The extension requires two custom attributes to be created for:
- Brand
- Google Category
If these attributes do not exist they should be created and mapped here. If a product has no value for either attribute then it will return the default value set here too.
You can view the feed that shows all products at:
http://www.domain.com/crearegoogleshopping/index/index/
If you would like to show a certain number of products you can use the following. For example this will show 1000 products at a time, starting with page 1:
http://www.domain.com/crearegoogleshopping/index/index/pagesize/1000/page/1
The next example this will show the next 1000 products (page 2)
http://www.domain.com/crearegoogleshopping/index/index/pagesize/1000/page/2
You can now also filter your feed further by adding attributeset/{id} to the end of the URL. Simply pass the attribute set ID as the agrument, for example:
http://www.domain.com/crearegoogleshopping/index/index/attributeset/10
This extension makes it easy for a developer to create further filters for their feeds. Simply edit the method called getVisibleProducts() in app/code/local/Creare/GoogleShopping/Model/Feed.php
First, add a new argument near the top of the method by assigning to a variable, e.g:
$brand = $request->getParam('brand');
Then, add the filter collection script before $collection->clear();
if (!empty($brand))
{
$collection->addAttributeToFilter('brand', $brand);
}
You can then use this in your feed URL, for example:
http://www.domain.com/crearegoogleshopping/index/index/brand/nike
You can combine as many of these filters as you like:
http://www.domain.com/crearegoogleshopping/index/index/brand/nike/attributeset/10/pagesize/1000/page/2
To disable the module open app/etc/modules/Creare_GoogleShopping.xml and in both change this:
<active>true</active>
to this:
<active>false</active>
After doing this, clear the cache and reindex your data.
- Adam Moss (@adampmoss)