title: Get Magento attribute names instead of ID numbers?
body: <p>I am using the following script to export a list of our products to send to Google for their shopping listing service (Google Base). The script works well, but it leaves the brand and manufacturer columns empty:</p>
  
  <pre><code>&lt;?php
  define('SAVE_FEED_LOCATION','google_base_feed.txt');
  set_time_limit(1800);
  require_once '../app/Mage.php';
  Mage::app('default');
  try{
      $handle = fopen(SAVE_FEED_LOCATION, 'w');
  
      $heading = array('id','mpn', 'upc','title','description','link','image_link','price','brand','product_type','condition', 'google_product_category', 'manufacturer', 'availability');
      $feed_line=implode("\t", $heading)."\r\n";
      fwrite($handle, $feed_line);
  
      $products = Mage::getModel('catalog/product')-&gt;getCollection();
      $products-&gt;addAttributeToFilter('status', 1);
      $products-&gt;addAttributeToFilter('visibility', 4);
      $products-&gt;addAttributeToSelect('*');
      $prodIds=$products-&gt;getAllIds();
  
      $product = Mage::getModel('catalog/product');
  
      $counter_test = 0;
  
      foreach($prodIds as $productId) {
  
          if (++$counter_test &lt; 30000){
  
              $product-&gt;load($productId);
  
              $product_data = array();
              $product_data['sku'] = $product-&gt;getSku();
              $product_data['mpn'] = $product-&gt;getData('upc');
              $product_data['upc'] = $product-&gt;getData('upc');
  
              $title_temp = $product-&gt;getName();
              if (strlen($title_temp) &gt; 70){
                  $title_temp = str_replace("Supply", "", $title_temp);
                  $title_temp = str_replace("  ", " ", $title_temp);
              }
              $product_data['title'] = $title_temp;
  
              $product_data['description'] = substr(iconv("UTF-8","UTF-8//IGNORE",$product-&gt;getDescription()), 0, 900);
              $product_data['Deeplink'] = "http://www.domainname.co.uk/store/".$product-&gt;getUrlPath(); 
              $product_data['image_link'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product-&gt;getImage();
  
              $price_temp = round($product-&gt;getPrice(),2);
              $product_data['price'] = round($product-&gt;getPrice(),2) * 
  1.2;
              $product_data['brand'] = $product-&gt;getAttribute('manufacturer');
  
              $product_data['product_type'] = 'Pet Products and Accessories';
              $product_data['condition'] = "new";
              $product_data['category'] = $product_data['brand'];
              $product_data['manufacturer'] = $product_data['brand'];
  
              $product_data['availability'] = "in stock";
  
              foreach($product_data as $k=&gt;$val){
                  $bad=array('"',"\r\n","\n","\r","\t");
                  $good=array(""," "," "," ","");
                  $product_data[$k] = '"'.str_replace($bad,$good,$val).'"';
              }
  
              echo $counter_test  . " ";
  
              $feed_line = implode("\t", $product_data)."\r\n";
              fwrite($handle, $feed_line);
              fflush($handle);
  
          }
  
      }
  
      fclose($handle);
  }
  catch(Exception $e){
      die($e-&gt;getMessage());
  }
  </code></pre>
  
  <p>The line in question is the following:</p>
  
  <pre><code>$product_data['brand'] = $product-&gt;getAttribute('manufacturer');
  </code></pre>
  
  <p>I can't find a way to show the manufacturer name instead of it's ID I have tried to change 'getAttribute' to 'getData' and 'getName' but none do what I need.</p>
  
  <p>Any help is appreciated!</p>