Ejemplo n.º 1
0
 /**
  * Set current attribute to entry (for specified product)
  *
  * @param Mage_Catalog_Model_Product $product
  * @param Varien_Gdata_Gshopping_Entry $entry
  * @return Varien_Gdata_Gshopping_Entry
  */
 public function convertAttribute($product, $entry)
 {
     $mapValue = $this->getProductAttributeValue($product);
     $description = $this->getGroupAttributeDescription();
     if (!is_null($description)) {
         $mapValue = $description->getProductAttributeValue($product);
     }
     if (!is_null($mapValue)) {
         $descrText = $mapValue;
     } elseif ($product->getDescription()) {
         $descrText = $product->getDescription();
     } else {
         $descrText = 'no description';
     }
     $descrText = Mage::helper('googleshopping')->cleanAtomAttribute($descrText);
     $entry->setContent($entry->getService()->newContent()->setText($descrText));
     return $entry;
 }