/** * Set current attribute to entry (for specified product) * * @param Mage_Catalog_Model_Product $product * @param Google_Service_ShoppingContent_Product $shoppingProduct * @return Google_Service_ShoppingContent_Product */ public function convertAttribute($product, $shoppingProduct) { if (is_null($this->getName())) { return $shoppingProduct; } $productAttribute = Mage::helper('googleshoppingapi/product')->getProductAttribute($product, $this->getAttributeId()); $type = $this->getGcontentAttributeType($productAttribute); $value = $this->getProductAttributeValue($product); if (!is_null($value)) { $name = Google_Utils::camelCase($this->getName()); $shoppingProduct->offsetSet($name, $value); } return $shoppingProduct; }