Search code examples
phpprestashopprestashop-1.6

How to remove header and footer from specific pages?


I have a prestashop website where I have header for whole page

I want header or footer to be hidden in a specific page eg shopping-cart

Here is my shopping cart page link http://localhost:8080/index.php?controller=order-opc#box-order-one

Here is how I tried to hide header inside shopping-cart.tpl

{if $page_name != 'box-order-one'}<div class="nav-tabs"></div>{/if}

But this does not work, what do I need to do to get what I want?


Solution

  • The easy and fast way is through CSS.

    For PS 1.6 (default theme):

    body#order .header-container,
    body#order .footer-container,
    body#order-opc .header-container,
    body#order-opc .footer-container {
      display: none !important;
    }
    

    For PS 1.7 (default theme):

    body#checkout #header,
    body#checkout #footer {
      display: none !important;
    }