title: Magento: add new attribute to all products
body: <p>I want to add a new attribute to all products. I have done it with a install script trough</p>
  
  <pre><code>$installer = $this;
  $installer-&gt;startSetup();
  
  $this-&gt;addAttribute('catalog_product','test2',array(
      'label'     =&gt; 'test2',
      'type'      =&gt; 'varchar',
      'visible'   =&gt; true,
      'required'  =&gt; false,
      'required'  =&gt; 0
  ));
  </code></pre>
  
  <p>But how can I add values to this attribute by </p>
  
  <pre><code>$entityTypeId     = $installer-&gt;getEntityTypeId('catalog_product');
  $attributeSetId   = $installer-&gt;getDefaultAttributeSetId($entityTypeId);
  $attributeGroupId = $installer-&gt;getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
  $installer-&gt;addAttributeGroup($entityTypeId, 'Default', 'test2', 0);
  $installer-&gt;endSetup();
  </code></pre>