O'Reilly logo

OpenCart Theme and Module Development by Rupak Nepali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the code in footer.tpl

The footer.tpl is located at catalog/view/theme/THEMENAME/template/common/footer.tpl, and it contains all the links to information pages and extra links to other pages. The same footer is shown for all the pages, so we describe the code in footer.tpl:

<footer>
  <div class="container">
    <div class="row">
<?php if ($informations) { ?>
      <div class="col-sm-3">
        <h5><?php echo $text_information; ?></h5>
        <ul class="list-unstyled">
          <?php foreach ($informations as $information) { ?>
          <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
          <?php } ?>
        </ul>
      </div>
      <?php } ?>

The preceding code starts the div with ID as the footer. It checks whether there are any information pages or not. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required