Post by Sladdaren » Tue Jan 26, 2021 1:00 am

Can i put a banner below search in default theme ?. And how to do it.
Image

http://volvosweden.se
https://www.youtube.com/c/VolvoswedenSe


New member

Posts

Joined
Fri Nov 13, 2020 12:15 am


Post by thekrotek » Tue Jan 26, 2021 1:18 am

You can put a banner anywhere you want, but you need to have some coding skills to achieve this.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Sladdaren » Tue Jan 26, 2021 1:25 am

thekrotek wrote:
Tue Jan 26, 2021 1:18 am
You can put a banner anywhere you want, but you need to have some coding skills to achieve this.
Sure. I know html pretty well

http://volvosweden.se
https://www.youtube.com/c/VolvoswedenSe


New member

Posts

Joined
Fri Nov 13, 2020 12:15 am


Post by thekrotek » Tue Jan 26, 2021 1:48 am

Sladdaren wrote:
Tue Jan 26, 2021 1:25 am
Sure. I know html pretty well
Good. Then do it.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Sladdaren » Tue Jan 26, 2021 2:11 am

thekrotek wrote:
Tue Jan 26, 2021 1:48 am
Sladdaren wrote:
Tue Jan 26, 2021 1:25 am
Sure. I know html pretty well
Good. Then do it.
I was hopping that someone that could give me a hint on how to do it. I posted this thread in general support, not in the love chatt category..

http://volvosweden.se
https://www.youtube.com/c/VolvoswedenSe


New member

Posts

Joined
Fri Nov 13, 2020 12:15 am


Post by thekrotek » Tue Jan 26, 2021 2:37 am

Sladdaren wrote:
Tue Jan 26, 2021 2:11 am
I was hopping that someone that could give me a hint on how to do it. I posted this thread in general support, not in the love chatt category..
There's a Commercial Support section, where you post your request, if you can not do it yourself.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by cmsroom » Tue Jan 26, 2021 2:44 am

In Opencart 3 Go to the catalog/view/theme/default/template/common/header.twig
After {{ search }} add your banner (You will get {{ search }} around line number 76).

You may like these extension : - https://www.opencart.com/index.php?rout ... r=cmsrooms


New member

Posts

Joined
Fri Sep 28, 2018 1:37 am

Post by thekrotek » Tue Jan 26, 2021 3:17 am

cmsroom wrote:
Tue Jan 26, 2021 2:44 am
In Opencart 3 Go to the catalog/view/theme/default/template/common/header.twig
After {{ search }} add your banner (You will get {{ search }} around line number 76).
I'm pretty sure he means a banner from Design -> Banners section, not just some custom image. In this case your solution isn't enough.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by mikeinterserv » Tue Jan 26, 2021 3:27 am

Yes you can do it
Make a swiper banner as normal in banners.
Place it on a page - now take the html source for the banner
NOW
You can place that HTML in your header.
it will look like this - you will have to play with it to get it how you want.
In this case I used the BRANDS CAROUSEL

Code: Select all

    <div class="swiper-viewport">
   <div id="carousel0" class="swiper-container">
   <div class="swiper-wrapper">     
   <div class="swiper-slide text-center"><img src="https://yourdomain/image/cache/catalog/chsm2-130x100.jpg" alt="" class="img-responsive" /></div>      
  <div class="swiper-slide text-center"><img src="https://yourdomain/image/cache/catalog/chsm3-130x100.jpg" alt="" class="img-responsive" /></div> 
   <div class="swiper-slide text-center"><img src="https://yourdomain/image/cache/catalog/94864738130x100.jpg" alt="" class="img-responsive" /></div>      
 <div class="swiper-slide text-center"><img src="https://yourdomain/image/cache/catalog/chsm8-130x100.jpg" alt="" class="img-responsive" /></div>     
</div>
  </div>
  <div class="swiper-pagination carousel0"></div>
  <div class="swiper-pager">
    <div class="swiper-button-next"></div>
    <div class="swiper-button-prev"></div>
  </div>
</div>
<script type="text/javascript"><!--
$('#carousel0').swiper({
	mode: 'horizontal',
	slidesPerView: 5,
	pagination: '.carousel0',
	paginationClickable: true,
	nextButton: '.swiper-button-next',
    prevButton: '.swiper-button-prev',
	autoplay: 2500,
	loop: true
});
--></script> 
To place it in the header find OC admin>design>theme editor>common>header.twig
replace

Code: Select all

<div class="col-sm-5">{{ search }}</div>
With

Code: Select all

<div class="col-sm-5">{{ search }} <br /> PASTE BANNER CODE HERE
This will place it WITHIN the search DIV tags
There are other ways to do this also. This is just a quick way that may help
In this instance the banner will be the width of the search div, like I say you will have to play with it to get what you want

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Sladdaren » Tue Jan 26, 2021 7:30 pm

Once again i got the help from you mikeinterserv :D . thank you, It worked just the way i want.
I did this a bit different and for others that see this thread.

The image or banner i want to put under search, i uploaded the banner to the web server and linked it from there
But i saved class="img-responsive"> in the code.
If im thinking the right way that saved code should resize the banner if its necessary ::)

http://volvosweden.se
https://www.youtube.com/c/VolvoswedenSe


New member

Posts

Joined
Fri Nov 13, 2020 12:15 am


Post by mikeinterserv » Tue Jan 26, 2021 8:47 pm

Well if it works for you and your are happy then that's it. :-)

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales
Who is online

Users browsing this forum: No registered users and 411 guests