I am using magento and it's built in functionality for adding products to google base. I would like to change it so that it uses the Short description as the Description in Google base. As opposed to the detailed description.
4 Answers
According to this Screencast you should be able to setup attribute attribute mappings. Is that not working for you?
Looking deeper, I don't have a google base account, so I can't test this, BUT, when I search through the Google Base module it looks like this is where it's grabbing the description
app/code/core/Mage/GoogleBase/Model/Service/Item.php
protected function _setUniversalData()
{
//...
if ($object->getDescription()) {
$content = $service->newContent()->setText( $object->getDescription() );
$entry->setContent($content);
}
//...
}
My general approach here would be to create an override for the _setUniversalData
method on the Mage_GoogleBase_Model_Service_Item
class that looks something like this
protected function _setUniversalData()
{
parent::_setUniversalData();
//your code to parse through this object, find the long desription,
//and replace with the short. The following is pseudo code and just
//a guess at what would work
$service = $this->getService();
$object = $this->getObject();
$entry = $this->getEntry();
$new_text = $object->getShortDescription(); //not sure on getter method
$content = $service->newContent()->setText( $new_text );
$entry->setContent($content);
return $this;
}
Good luck!

- 164,128
- 91
- 395
- 599
-
the mappings only seem to be for non default attributes. The description seems to be hard coded somewhere but I can't find where. – a1anm Apr 04 '10 at 14:45
-
Update the answer with some more info. Good luck! – Alana Storm Apr 04 '10 at 19:40
Figured out all I had to do was change:
if ($object->getDescription()) {
$content = $service->newContent()->setText( $object->getDescription() );
$entry->setContent($content);
}
to
if ($object->getDescription()) {
$content = $service->newContent()->setText( $object->getShortDescription() );
$entry->setContent($content);
}
in app/code/core/Mage/GoogleBase/Model/Service/Item.php

- 1,617
- 11
- 45
- 78
Magento 1.7.0.2 Google Shopping 1.7.0.0
app/code/core/Mage/GoogleShopping/Model/Attribute/Content.php
Change $description = $this->getGroupAttributeDescription();
In $description = $this->getGroupAttributeShortDescription();

- 49,761
- 33
- 66
- 176
I eventually got the module to work and managed to fix all errors.
I put together short step-by-step guide on how to set up the Magento Google Base feed, including account configuration, adding the condition attribute & mapping attributes and publishing them here http://blog.pod1.com/e-commerce/magento-google-base-feed/