title: Add brand description on manufacturer list page in opencart
body: <p><a href="https://i.stack.imgur.com/AOX9O.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AOX9O.jpg" alt="enter image description here"></a>I want to add a description of brand in OpenCart 2.0 on a <em>manufacturer</em> <em>list</em> page.</p>
  
  <p>There are many extensions that allow adding a description in the brand; but none (that I've found) to add it to the manufacturer list page. All give the solution to add it to the manufacturer <em>info</em> page.</p>
  
  <pre><code>&lt;modification&gt;
      &lt;id&gt;Manufacturer Description&lt;/id&gt;
          &lt;code&gt;Manufacturer-Description&lt;/code&gt;
          &lt;name&gt;Manufacturer Description Extension&lt;/name&gt;
      &lt;author&gt;&lt;![CDATA[tabook]]&gt;&lt;/author&gt;
      &lt;version&gt;0.1.0&lt;/version&gt;
      &lt;file path="admin/language/english/catalog/manufacturer.php"&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[&lt;?php]]&gt;&lt;/search&gt;
              &lt;add position="after"&gt;&lt;![CDATA[$_['entry_description']  = 'Description';]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
      &lt;file path="admin/language/russian/catalog/manufacturer.php"&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[&lt;?php]]&gt;&lt;/search&gt;
              &lt;add position="after"&gt;&lt;![CDATA[$_['entry_description']  = 'Описание';]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
      &lt;file path="admin/controller/catalog/manufacturer.php"&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[$data['entry_name'] = $this-&gt;language-&gt;get('entry_name');]]&gt;&lt;/search&gt;
              &lt;add position="after"&gt;&lt;![CDATA[$data['entry_description'] = $this-&gt;language-&gt;get('entry_description');]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[$this-&gt;load-&gt;model('setting/store');]]&gt;&lt;/search&gt;
              &lt;add position="before"&gt;&lt;![CDATA[
          $this-&gt;load-&gt;model('localisation/language');
  
          $data['languages'] = $this-&gt;model_localisation_language-&gt;getLanguages();
  
          if (isset($this-&gt;request-&gt;post['manufacturer_description'])) {
              $data['manufacturer_description'] = $this-&gt;request-&gt;post['manufacturer_description'];
          } elseif (!empty($manufacturer_info)) {
              $data['manufacturer_description'] = $this-&gt;model_catalog_manufacturer-&gt;getManufacturerDescriptions($this-&gt;request-&gt;get['manufacturer_id']);
          } else {
              $data['manufacturer_description'] = array();
          }]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
      &lt;file path="admin/model/catalog/manufacturer.php"&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[public function getTotalManufacturers() {]]&gt;&lt;/search&gt;
              &lt;add position="before"&gt;&lt;![CDATA[
      public function getManufacturerDescriptions($manufacturer_id) {
          $manufacturer_description_data = array();
  
          $query = $this-&gt;db-&gt;query("SELECT * FROM " . DB_PREFIX . "manufacturer_description WHERE manufacturer_id = '" . (int)$manufacturer_id . "'");
  
          foreach ($query-&gt;rows as $result) {
              $manufacturer_description_data[$result['language_id']] = array(
                  'description'      =&gt; $result['description']
              );
          }
  
          return $manufacturer_description_data;
      }
          ]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[$manufacturer_id = $this-&gt;db-&gt;getLastId();]]&gt;&lt;/search&gt;
              &lt;add position="after"&gt;&lt;![CDATA[
          foreach ($data['manufacturer_description'] as $language_id =&gt; $value) {
              $this-&gt;db-&gt;query("INSERT INTO " . DB_PREFIX . "manufacturer_description SET manufacturer_id = '" . (int)$manufacturer_id . "', language_id = '" . (int)$language_id . "', description = '" . $this-&gt;db-&gt;escape($value['description']). "'");
          }
          ]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[$this-&gt;event-&gt;trigger('pre.admin.manufacturer.edit', $data);]]&gt;&lt;/search&gt;
              &lt;add position="after"&gt;&lt;![CDATA[
          $this-&gt;db-&gt;query("DELETE FROM " . DB_PREFIX . "manufacturer_description WHERE manufacturer_id = '" . (int)$manufacturer_id . "'");
  
          foreach ($data['manufacturer_description'] as $language_id =&gt; $value) {
              $this-&gt;db-&gt;query("INSERT INTO " . DB_PREFIX . "manufacturer_description SET manufacturer_id = '" . (int)$manufacturer_id . "', language_id = '" . (int)$language_id . "', description = '" . $this-&gt;db-&gt;escape($value['description']). "'");
          }
          ]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[$this-&gt;event-&gt;trigger('pre.admin.manufacturer.delete', $manufacturer_id);]]&gt;&lt;/search&gt;
              &lt;add position="after"&gt;&lt;![CDATA[
  $this-&gt;db-&gt;query("DELETE FROM " . DB_PREFIX . "manufacturer_description WHERE manufacturer_id = '" . (int)$manufacturer_id . "'");
          ]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
      &lt;file path="admin/view/template/catalog/manufacturer_form.tpl"&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[&lt;/form&gt;]]&gt;&lt;/search&gt;
              &lt;add position="before"&gt;&lt;![CDATA[
                      &lt;div class="form-group"&gt;
                          &lt;label class="col-sm-2 control-label"&gt;&lt;?php echo $entry_description; ?&gt;&lt;/label&gt;
                          &lt;div class="col-sm-10"&gt;
                              &lt;ul class="nav nav-tabs" id="language"&gt;
                                  &lt;?php foreach ($languages as $language) { ?&gt;
                                  &lt;li&gt;&lt;a href="#language&lt;?php echo $language['language_id']; ?&gt;" data-toggle="tab"&gt;&lt;img src="view/image/flags/&lt;?php echo $language['image']; ?&gt;" title="&lt;?php echo $language['name']; ?&gt;" /&gt; &lt;?php echo $language['name']; ?&gt;&lt;/a&gt;&lt;/li&gt;
                                  &lt;?php } ?&gt;
                              &lt;/ul&gt;&lt;div class="tab-content"&gt;
                              &lt;?php foreach ($languages as $language) { ?&gt;
                              &lt;div class="tab-pane" id="language&lt;?php echo $language['language_id']; ?&gt;"&gt;
                                  &lt;textarea name="manufacturer_description[&lt;?php echo $language['language_id']; ?&gt;][description]" rows="5" id="input-manufacturer-description&lt;?php echo $language['language_id']; ?&gt;" class="form-control"&gt;&lt;?php echo isset($manufacturer_description[$language['language_id']]) ? $manufacturer_description[$language['language_id']]['description'] : ''; ?&gt;&lt;/textarea&gt;
                              &lt;/div&gt;
                              &lt;?php } ?&gt;&lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  ]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[&lt;?php echo $footer; ?&gt;]]&gt;&lt;/search&gt;
              &lt;add position="before"&gt;&lt;![CDATA[
  &lt;script type="text/javascript"&gt;&lt;!--
      &lt;?php foreach ($languages as $language) { ?&gt;
          $('#input-manufacturer-description&lt;?php echo $language['language_id']; ?&gt;').summernote({height: 300});
      &lt;?php } ?&gt;
  $('#language a:first').tab('show');
      //--&gt;&lt;/script&gt;
          ]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
      &lt;file path="catalog/controller/product/manufacturer.php"&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[$results = $this-&gt;model_catalog_product-&gt;getProducts($filter_data);]]&gt;&lt;/search&gt;
              &lt;add position="after"&gt;&lt;![CDATA[$data['description'] = html_entity_decode($manufacturer_info['description'], ENT_QUOTES, 'UTF-8');]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
      &lt;file path="catalog/model/catalog/manufacturer.php"&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[$query = $this-&gt;db-&gt;query("SELECT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m.manufacturer_id = '" . (int)$manufacturer_id . "' AND m2s.store_id = '" . (int)$this-&gt;config-&gt;get('config_store_id') . "'");]]&gt;&lt;/search&gt;
              &lt;add position="replace"&gt;&lt;![CDATA[$query = $this-&gt;db-&gt;query("SELECT DISTINCT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_description md ON (m.manufacturer_id = md.manufacturer_id AND md.language_id = '" . (int)$this-&gt;config-&gt;get('config_language_id') . "') LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m.manufacturer_id = '" . (int)$manufacturer_id . "' AND m2s.store_id = '" . (int)$this-&gt;config-&gt;get('config_store_id') . "'");]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[$sql = "SELECT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m2s.store_id = '" . (int)$this-&gt;config-&gt;get('config_store_id') . "'";]]&gt;&lt;/search&gt;
              &lt;add position="replace"&gt;&lt;![CDATA[$sql = "SELECT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_description md ON (m.manufacturer_id = md.manufacturer_id AND md.language_id = '" . (int)$this-&gt;config-&gt;get('config_language_id') . "') LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m2s.store_id = '" . (int)$this-&gt;config-&gt;get('config_store_id') ."'";]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[$query = $this-&gt;db-&gt;query("SELECT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m2s.store_id = '" . (int)$this-&gt;config-&gt;get('config_store_id') . "' ORDER BY name");]]&gt;&lt;/search&gt;
              &lt;add position="replace"&gt;&lt;![CDATA[$query = $this-&gt;db-&gt;query("SELECT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_description md ON (m.manufacturer_id = md.manufacturer_id AND md.language_id = '" . (int)$this-&gt;config-&gt;get('config_language_id') . "') LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m2s.store_id = '" . (int)$this-&gt;config-&gt;get('config_store_id') . "' ORDER BY name");]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
      &lt;file path="catalog/view/theme/default/template/product/manufacturer_info.tpl"&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[&lt;h2&gt;&lt;?php echo $heading_title; ?&gt;&lt;/h2&gt;]]&gt;&lt;/search&gt;
              &lt;add position="after"&gt;&lt;![CDATA[
  &lt;?php if ($description) { ?&gt;
              &lt;div class="manufacturer-info"&gt;&lt;?php echo $description; ?&gt;&lt;/div&gt;
              &lt;?php } ?&gt;
  ]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
  &lt;/modification&gt;
  </code></pre>
  
  <p>Below is the code to add description to the manufacturer page, but as a add one more operation that is </p>
  
  <pre><code>&lt;file path="catalog/view/theme/default/template/product/manufacturer_list.tpl"&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[&lt;h2&gt;&lt;?php echo $heading_title; ?&gt;&lt;/h2&gt;]]&gt;&lt;/search&gt;
              &lt;add position="after"&gt;&lt;![CDATA[
  &lt;?php if ($description) { ?&gt;
              &lt;div class="manufacturer-info"&gt;&lt;?php echo $description; ?&gt;&lt;/div&gt;
              &lt;?php } ?&gt;
  ]]&gt;&lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
  </code></pre>
  
  <p>to add description to the manufacturer list page it is given the following error</p>
  
  <pre><code>Notice: Undefined variable: description in C:\wamp\www\10\catalog\view\theme\default\template\product\manufacturer_list.tpl on line 32
  </code></pre>