Puriom Posted February 27, 2018 Share Posted February 27, 2018 Hello! Somehow on my header, at the top left position, where the "contact us" form is supposed to be, now there is only the words "Call us: 01234567) (our real tel. number). I found out that the seo+url page "contact us" was missing, and I made a new one, which was added at the footer. How do I add the link on the header? (In trasplant hooks I wasn't able to locate it.) Thank you (My theme is a child of the Classic theme.) Link to comment Share on other sites More sharing options...
nadie Posted February 27, 2018 Share Posted February 27, 2018 (edited) hace 8 horas, Puriom dijo: Hello! Somehow on my header, at the top left position, where the "contact us" form is supposed to be, now there is only the words "Call us: 01234567) (our real tel. number). I found out that the seo+url page "contact us" was missing, and I made a new one, which was added at the footer. How do I add the link on the header? (In trasplant hooks I wasn't able to locate it.) Thank you (My theme is a child of the Classic theme.) Check tutorial: https://victor-rodenas.com/2017/10/26/no-se-ve-el-enlace-de-contacte-con-nosotros-en-la-cabecera-de-prestashop-1-7/ (in Spanish (Use google translator) ) Edit the file: There is a conditional , which shows the phone or shows the phrase contact us. Check the guide and you will understand. In default theme file -> /themes/classic/modules/ps_contactinfo/nav.tpl Sorry for my English, Edited February 27, 2018 by nadie (see edit history) 1 Link to comment Share on other sites More sharing options...
Puriom Posted February 27, 2018 Author Share Posted February 27, 2018 (edited) Hello, thank you for the GREAT answer!! Do you (maybe) know, how, after insterting the link for "contact us", how can I delete the whole telephone syntax? With the link I'm perfect OK, but I don't know how to remove the telephone part completely from header Here is the code: * @author PrestaShop SA <[email protected]> * @copyright 2007-2017 PrestaShop SA * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * International Registered Trademark & Property of PrestaShop SA *} <div id="_desktop_contact_link"> <div id="contact-link"> {if $contact_infos.phone} <a href="{$urls.pages.contact}">{l s='Contact us' d='Shop.Theme.Global'}</a> {* [1][/1] is for a HTML tag. *} {l s='Call us: [1]%phone%[/1]' sprintf=[ '[1]' => '<span>', '[/1]' => '</span>', '%phone%' => $contact_infos.phone ] d='Shop.Theme.Global' } {else} <a href="{$urls.pages.contact}">{l s='Contact us' d='Shop.Theme.Global'}</a> {/if} </div> </div> Edited February 27, 2018 by Puriom (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted February 27, 2018 Share Posted February 27, 2018 (edited) If you want to remove the phone and leave only the contact link: <div id="_desktop_contact_link"> <div id="contact-link"> <a href="{$urls.pages.contact}">{l s='Contact us' d='Shop.Theme.Global'}</a> </div> </div> Edited February 27, 2018 by nadie (see edit history) 1 1 Link to comment Share on other sites More sharing options...
Puriom Posted February 28, 2018 Author Share Posted February 28, 2018 You're great! THANK YOU 1 Link to comment Share on other sites More sharing options...
Alvi Posted August 1, 2018 Share Posted August 1, 2018 Hello, I want to change contact us url link ( $urls.pages.contact). I have created one static page and its url is /content/7-100-days-return how i can give new created page link instead of contact us link? Thanks Link to comment Share on other sites More sharing options...
Madhusudan Posted June 10, 2023 Share Posted June 10, 2023 Call us is not showing at its place. Proprieties in Console showing contact-link = display: none !important. How to fix it. Link to comment Share on other sites More sharing options...
MariusTattooSupplies Posted January 19 Share Posted January 19 (edited) I want to change and make clickable the phone number from the left upper corner in classic theme. Can someone help me? I search for 2 months and no results. I have found this code: <a href="Call us :+3333333333">+3333333333</a> Where to put it? What is the file to open for adding this code? I have Prestashop 1.7.8 Thank you. Edited January 19 by MariusTattooSupplies (see edit history) Link to comment Share on other sites More sharing options...
Andrei H Posted January 21 Share Posted January 21 (edited) Hello @MariusTattooSupplies, You will need to edit the following file: themes/classic/modules/ps_contactinfo/nav.tpl Replacing the code from lines 25-42 with the following should fix your issue: <div id="_desktop_contact_link"> <div id="contact-link"> {if $contact_infos.phone} {assign var="tel_link" value="<a href='tel:{$contact_infos.phone}'>"} {* [1][/1] is for a HTML tag. *} {l s='Call us: [1]%phone%[/1]' sprintf=[ '[1]' => $tel_link, '[/1]' => '</a>', '%phone%' => $contact_infos.phone ] d='Shop.Theme.Global' } {else} <a href="{$urls.pages.contact}">{l s='Contact us' d='Shop.Theme.Global'}</a> {/if} </div> </div> Also, please make sure you have the Template compilation setting set to 'Recompile templates if the files have been updated' in Admin -> Advanced Parameters -> Performance Once you refresh the page, the phone number should be clickable. Edited January 21 by Andrei H (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now