function _buildItemFromProduct($p)
 {
     $this->_getParentCategoryNames($categories = array(), $p->categories);
     $p->categories = array_reverse($categories);
     $p->link = HTTP_SERVER . DIR_WS_CATALOG . "index.php?main_page=product_info&products_id={$p->zen_id}";
     $item = new GoogleBaseItem();
     $item->setDraftStatus((bool) $this->getOption('draft'));
     $item->setTitle($p->title, 'text/html');
     $item->setDescription($p->description, 'text/html');
     $item->setAuthor($this->getOption('authorname'), $this->getOption('authoremail'));
     $item->setLink($p->link);
     $item->addGbaseAttribute('item_type', 'Products');
     $item->addGbaseAttribute('quantity', $p->quantity);
     $item->addGbaseAttribute('price', $p->price);
     $item->addGbaseAttribute('id', $p->zen_id);
     $item->addGbaseAttribute('zen_id', $p->zen_id, 'int', true);
     $item->addGbaseAttribute('condition', 'new');
     if (zen_not_null($p->image_link)) {
         $item->addGbaseAttribute('image_link', DIR_WS_CATALOG_IMAGES . $p->image_link);
     }
     if (zen_not_null($p->weight)) {
         $item->addGbaseAttribute('weight', $p->weight . ' ' . TEXT_PRODUCT_WEIGHT_UNIT, 'numberunit');
     }
     if (zen_not_null($p->upc)) {
         $item->addGbaseAttribute('upc', $p->upc);
     }
     if (zen_not_null($p->isbn)) {
         $item->addGbaseAttribute('isbn', $p->isbn);
     }
     if (defined('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS') && constant('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS') == 'True') {
         $item->addGbaseAttribute('payment_notes', 'Google Checkout');
     }
     foreach ($p->categories as $cat) {
         $item->addGbaseAttribute('product_type', $cat);
     }
     return $item;
 }