title: How to display product Attribute Group Name on Magento Product page attribute tab?
body: <p>i did some coding to group the product attributes on frontend and show their groups names above theme like this:</p>
  
  <ul>
  <li>attgroup 1<br>
  <ul>
  <li>attribute 1</li>
  <li>attribute 2  </li>
  <li>...</li>
  </ul></li>
  <li>attgroup 2 
  <ul>
  <li>attribute 3 </li>
  <li>attribute 4</li>
  <li>...</li>
  </ul></li>
  </ul>
  
  <p>I added <strong>/app/code/local/Mage/Catalog/Block/Product/View/Attributesgroups.php</strong> with the following code:</p>
  
  <pre><code>&lt;?php
  class Mage_Catalog_Block_Product_View_Attributesgroups extends Mage_Core_Block_Template
  {
      protected $_product = null;
  
      function getProduct()
      {
          if (!$this-&gt;_product) {
              $this-&gt;_product = Mage::registry('product');
          }
          return $this-&gt;_product;
      }
  
      public function getAdditionalData(array $excludeAttr = array())
      {
          $data = array();
  
          $product = $this-&gt;getProduct();
          $attributes = $product-&gt;getAttributes();
          foreach ($attributes as $attribute) {
  
              if ($attribute-&gt;getIsVisibleOnFront() &amp;&amp; !in_array($attribute-&gt;getAttributeCode(), $excludeAttr)) {
  
                  $value = $attribute-&gt;getFrontend()-&gt;getValue($product);
  
                  // TODO this is temporary skipping eco taxes
                  if (is_string($value)) {
                      if (strlen($value) &amp;&amp; $product-&gt;hasData($attribute-&gt;getAttributeCode())) {
                          if ($attribute-&gt;getFrontendInput() == 'price') {
                              $value = Mage::app()-&gt;getStore()-&gt;convertPrice($value,true);
                          } elseif (!$attribute-&gt;getIsHtmlAllowedOnFront()) {
                              $value = $this-&gt;htmlEscape($value);
                          }
  
                          $group = 0;
                          if( $tmp = $attribute-&gt;getData('attribute_group_id') ) {
                              $group = $tmp;
                          }
  
                          $data[$group]['items'][ $attribute-&gt;getAttributeCode()] = array(
                             'label' =&gt; $attribute-&gt;getFrontend()-&gt;getLabel(),
                             'value' =&gt; $value,
                             'code'  =&gt; $attribute-&gt;getAttributeCode()
                          );
  
                          $data[$group]['attrid'] = $attribute-&gt;getId();
  
                      }
                  }
              }
          }
  
          // Noch Titel lesen
          foreach( $data AS $groupId =&gt; &amp;$group ) {
              $groupModel = Mage::getModel('eav/entity_attribute_group')-&gt;load( $groupId );
              $group['title'] = $groupModel-&gt;getAttributeGroupName();
          }
  
          return $data;
      }
  }
  </code></pre>
  
  <p>Then, I created the <strong>/app/design/frontend/MY_TEMPLATE/default/template/catalog/product/view/attributesgroups.phtml</strong> file with the following content:</p>
  
  <pre><code>&lt;?php
      $_helper = $this-&gt;helper('catalog/output');
      $_product = $this-&gt;getProduct()
  ?&gt;
  &lt;?php if($_additionalgroup = $this-&gt;getAdditionalData()): ?&gt;
  &lt;div class="box-collateral box-additional"&gt;
      &lt;h2&gt;&lt;?php echo $this-&gt;__('Additional Information') ?&gt;&lt;/h2&gt;
  
      &lt;?php $i=0; foreach ($_additionalgroup as $_additional): $i++; ?&gt;
          &lt;h3&gt;&lt;?php echo $this-&gt;__( $_additional['title'] )?&gt;&lt;/h3&gt;
          &lt;table class="data-table" id="product-attribute-specs-table-&lt;?php echo $i?&gt;"&gt;
              &lt;col width="25%" /&gt;
              &lt;col /&gt;
              &lt;tbody&gt;
              &lt;?php foreach ($_additional['items'] as $_data): ?&gt;
                  &lt;tr&gt;
                      &lt;th class="label"&gt;&lt;?php echo $this-&gt;htmlEscape($this-&gt;__($_data['label'])) ?&gt;&lt;/th&gt;
                      &lt;td class="data"&gt;&lt;?php echo $_helper-&gt;productAttribute($_product, $_data['value'], $_data['code']) ?&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;?php endforeach; ?&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
          &lt;script type="text/javascript"&gt;decorateTable('product-attribute-specs-table-&lt;?php echo $i?&gt;')&lt;/script&gt;
      &lt;?php endforeach; ?&gt;
  
  &lt;/div&gt;
  &lt;?php endif;?&gt;
  </code></pre>
  
  <p>Last step was to modify <strong>/app/design/frontend/default/YOUR_TEMPLATE/layout/catalog.xml</strong> in line 223, and replaced </p>
  
  <pre><code>&lt;block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml"&gt;
  </code></pre>
  
  <p>with</p>
  
  <pre><code>&lt;block type="catalog/product_view_attributesgroups" name="product.attributes" as="additional" template="catalog/product/view/attributesgroups.phtml"&gt;
  </code></pre>
  
  <p>i did this but nothing is changed on product attribute tap on frontend product page.</p>
  
  <blockquote>
    <p>im using magento 1.9.1 ce and custom template</p>
  </blockquote>