Tuesday, 1 November 2016

Move the Search Bar in Opencart

For this tutorial I will be showing you how to move the search bar in Opencart, I will be using my cPanel File Manager. I will be moving the search bar underneath the cart button and make them the same size, on the right-hand side of the screen.


This is where I will be moving the search bar.



On your file manager, you will need to locate header.tlp (path -catalog/view/theme/default/template/common/header.tlp). In this folder, you will need to change a few lines of the code.

On line 72 it should read <div class="col-sm-4”>, this needs to be changed to <div class="col-sm-9”>

Now find line 81, you will need to change a few lines of code. It should read: 

</div>
      <div class="col-sm-5"><?php echo $search; ?> 
      </div>
      <div class="col-sm-3"><?php echo $cart; ?></div>

    </div>

change that section of code to:

</div>
<div class="col-sm-3"><?php echo $cart; ?></div>
<div class="col-sm-3"><?php echo $search; ?>
</div>



Save the changes and refresh your store and the search bar will be underneath the cart.

Final Result.
Sam


0 comments:

Post a Comment