Jump to content

override header.tpl of prestashop 1.6 default-bootstrap theme


Recommended Posts

Hello, I'm new with prestashop and I want put the phone of store in the top left of the default-bootstrap theme like show in the image attached....

I find that if I edit /themes/default-bootstrap/header.tpl I get this behavior:

<nav>
  <span class="shop-phone">
    <i class="icon-phone"></i>
    809 - 000 - 0000
  </span>
  {hook h="displayNav"}
</nav>

But I'll lose the change if I upgrade this theme in the future...

How can I override this behavior for maintain this change for future update?

Other question, How can I get the phone of ps_store table  to put it instead of putting 809 - 000 - 0000?

 

Thanks in Avanced!

post-774053-0-91095400-1395296148_thumb.png

Link to comment
Share on other sites

1. Create new theme and copy files from original theme. Don't forget to change theme to new theme. Then make changes to new theme and original theme willk stay untouched.

 

2. I'm not sure what you mean, but if you want to change phone number go to Backoffice > Modules, search for Contact block and click on Configure. There you can change phone number.

  • Like 1
Link to comment
Share on other sites

1. For default the theme not has the phone number in top left...

 

2. If I do hook of contact block I going to have a lot of information... but I only need the phone...

 

3. I try to put html module but for any reason not show...

 

4. Have you know about any tutorial for do override?

 

Thanks for help!

Link to comment
Share on other sites

  • 3 weeks later...
  • 7 months later...

I find that if I edit /themes/default-bootstrap/header.tpl I get this behavior:

But I'll lose the change if I upgrade this theme in the future...

How can I override this behavior for maintain this change for future update?

 

Thanks in Avanced!

 

Did you ever find a solution for this, I'm looking to override it too, 

Link to comment
Share on other sites

  • 7 months later...

override is bad word for this what you're looking for.

you said that you want to replace image to new one. si you just need to replace image - not any kind of "override" -

this image it's an image added to module named "block banner"

and you can replace it on module configuration page

iOV4You.png

 

 

if you're looking for something different - please let me know WHAT EXACTLY you're trying to achieve.

Link to comment
Share on other sites

  • 1 month later...

I want to have my header to have a large phone number as it has now. http://www.temporaryfencingstore.co.nz/

However I am using Prestashop cloud and have brought an add on that works well only in desktop. I wish to have a mobile version that still shows the phone number correctly. At the moment it shows like this http://prntscr.com/81eid0

 

what can you recommend please?

 

 

 

Link to comment
Share on other sites

1. If you only want see the large phone number you can edit css the module that show the phone number, now I not using prestashop and I not remember what is the exact module but you can check with browser inspector.

 

2. If you want show your header like the reference, I beleive you going to need create a new module. Can be a simple module. I recomend this option.

  • Like 1
Link to comment
Share on other sites

  • 11 months later...

The best practice is to use $this->context->controller->addJS() inside a module to add JavaScript so that all the files can be combined and compressed into a single JavaScript file, but if you must manually add a JavaScript file, you can edit header.tpl in your theme's directory to add it directly inside the <head> tag.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...