Add Information block in the header through the vQmod in Opencart

If we are integrating the Custom theme / HTML in Opencart, We want to display the Information block into the Header in place of the Category link. Here is the vqmod script by which you can display the Information block into the header. Follow the steps below:

Step 1 : Use/Copy the code below:

<?xml version="1.0" encoding="UTF-8"?>
<id>Add Information module to header</id>
<file name="catalog/controller/common/header.php">
        <search position="before"><![CDATA[$this->render();]]></search>

        $this->data['informations'] = array();
        foreach ($this->model_catalog_information->getInformations() as $result) {
            $this->data['informations'][] = array(
                'title' => $result['title'],
                'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])

Step 2 : Paste it in the file and save it with the name informationslink_to_header.xml
Step 3 : Upload the add_categoriess_to_right.xml by using the vqmod or directly by using the FTP on this location /vqmod/xml

Step 4 : Copy the below code

<div class="column">
    <h3><?php echo $text_information; ?></h3>
      <?php foreach ($informations as $information) { ?>
      <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
      <?php } ?>

Step 5 : Now open the header.tpl by navigating to catalog -> view -> theme -> [your_custom_theme] -> template -> common and Paste the above code at the Top of this file. Refresh the Vqmod cache through the admin panel and you have done.

Hope this will help to someone.