T
T
Timur1632019-03-24 15:11:55
Twig
Timur163, 2019-03-24 15:11:55

How to edit header.twig in opencart 3.0?

I'm trying to remove the top of the header (where the language and currency change). Everything seems to be clear in the standard header.twig, I found this block there. But in the header.twig from the template, nothing is clear, I tried to find through viewing the element in the browser, the block is called "top" and wrapped in the "common-home" block, but I could not find any traces anywhere.
This is what header.twig looks like from the template

<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="{{ direction }}" lang="{{ lang }}" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="{{ direction }}" lang="{{ lang }}" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="{{ direction }}" lang="{{ lang }}">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ title }}</title>
<base href="{{ base }}" />
{% if description %}
<meta name="description" content="{{ description }}" />	
{% endif %}
{% if keywords %}
<meta name="keywords" content="{{ keywords }}" />
{% endif %}
<link href="catalog/view/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
{% for style in styles %}
<link href="{{ style.href }}" type="text/css" rel="{{ style.rel }}" media="{{ style.media }}" />
{% endfor %}
<link href="catalog/view/javascript/jquery/swiper/css/swiper.min.css" rel="stylesheet" type="text/css" />
<!-- icon font -->
<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="catalog/view/javascript/ionicons/css/ionicons.css" rel="stylesheet" type="text/css" />
  <!-- use for debaco -->
<link href="catalog/view/javascript/linearicons-free/style.css" rel="stylesheet" type="text/css" />
<!-- end icon font -->
<link href="catalog/view/theme/tt_debaco3/stylesheet/stylesheet.css" rel="stylesheet">
<link href="catalog/view/theme/tt_debaco3/stylesheet/plaza/header/header{{ header_layout }}.css" rel="stylesheet">
<link href="catalog/view/theme/tt_debaco3/stylesheet/plaza/theme.css" rel="stylesheet">
<script src="catalog/view/javascript/jquery/jquery-2.1.1.min.js" ></script>
<script src="catalog/view/javascript/jquery/swiper/js/swiper.min.js" ></script>
{% for script in scripts %}
<script src="{{ script }}" ></script>
{% endfor %}
<script src="catalog/view/javascript/common.js" ></script>
{% for link in links %}
<link href="{{ link.href }}" rel="{{ link.rel }}" />
{% endfor %}
{% for analytic in analytics %}
{{ analytic }}
{% endfor %}
<!-- Lazy Load -->
  {% if lazy_load %}
    <script src="catalog/view/javascript/plaza/lazyload/jquery.lazy.min.js" ></script>
    <script>
      $(function() {
        $('.lazy-img').lazy({
          effect: "fadeIn",
          effectTime: 100,
          threshold: 200
        });
      });
    </script>
  {% endif %}
  <!-- Quick view -->
  {% if use_quick_view %}
    <script src="catalog/view/javascript/plaza/cloudzoom/cloud-zoom.1.0.2.min.js" ></script>
    <script src="catalog/view/javascript/plaza/cloudzoom/zoom.js" ></script>
    <script src="catalog/view/javascript/plaza/quickview/quickview.js" ></script>
    <link href="catalog/view/theme/tt_debaco3/stylesheet/plaza/quickview/quickview.css" rel="stylesheet" type="text/css" />
  {% endif %}
  <!-- General -->
  <!-- Sticky Menu -->
  {% if sticky_header %}
   <script >
   $(document).ready(function () {	
    var height_box_scroll = $('.scroll-fix').outerHeight(true);
    $(window).scroll(function () {
    if ($(this).scrollTop() > 400) {
      $('.scroll-fix').addClass("scroll-fixed");
      $('body').css('padding-top',height_box_scroll);
    } else {
      $('.scroll-fix').removeClass("scroll-fixed");
      $('body').css('padding-top',0);
    }
    });
  });
  </script>
  {% endif %}
  <!-- Scroll Top -->
  {% if scroll_top %}
    <script>
      $("#back-top").hide();
      $(function () {
        $(window).scroll(function () {
          if ($(this).scrollTop() > $('body').height()/3) {
            $('#back-top').fadeIn();
          } else {
            $('#back-top').fadeOut();
          }
        });
        $('#back-top').click(function () {
          $('body,html').animate({scrollTop: 0}, 800);
          return false;
        });
      });
    </script>
  {% endif %}
  <!-- Advance -->
  {% if custom_css %}
    <style>
      {{ custom_css }}
    </style>
  {% endif %}
  {% if custom_js %}
    <script>
      {{ custom_js }}
    </script>
  {% endif %}
  <!-- Bootstrap Js -->
  <script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" ></script>
</head>
<body class="{{ class }}">
<div class="wrapper">
{% if scroll_top %}
  <div id="back-top"><i class="ion-chevron-up"></i></div>
{% endif %}
{{ header }}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Polos, 2019-03-24
@Timur163

At the bottom of the template, the variable {{ header }} or data['header'] is connected, look for which template is responsible for this header, perhaps the controller will help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question