Jump to content

Add a link "tel:+123456789" in the phone numbers


webdesign_ajnet

Recommended Posts

2 minutes ago, SmartDataSoft said:

@webdesign_ajnet

 

Qual versão do PrestaShop você está usando 1.6 ou 1.7, seu tema é o tema nativo do Prestashop. Em qual módulo você tentou fazer. Normalmente, se o texto do módulo não for definido com tel: nesse caso, ele não será exibido. Depois de obter as informações, podemos sugerir onde você precisa modificar

 

obrigada

Thanks for your reply.

Prestashop version 1.6

Theme: default-bootstrap version 1.0 - PrestaShop Design

Module: Contact Block v1.4.1 and in the Contact Information Block module v1.2.1


 

Link to comment
Share on other sites

@webdesign_ajnet

 

1.6.1.24\themes\default-bootstrap\modules\blockcontactinfos\blockcontactinfos.tpl line 40 

<span>{$blockcontactinfos_phone|escape:'html':'UTF-8'}</span>

to bellow it will call able no

<a href="tel:+{$blockcontactinfos_phone|escape:'html':'UTF-8'}">{$blockcontactinfos_phone|escape:'html':'UTF-8'}</a>

 

Thank you

Edited by SmartDataSoft (see edit history)
Link to comment
Share on other sites

 

@webdesign_ajnet

I have update the answer please check now.

\1.6.1.24\themes\default-bootstrap\modules\blockcontact\blockcontact.tpl

    {if $telnumber != ''}
            <p class="tel">
                <span class="label">{l s='Phone:' mod='blockcontact'}</span>{$telnumber|escape:'html':'UTF-8'}
            </p>
        {/if}

to 

      

  {if $telnumber != ''}
            <p class="tel">
                <span class="label">{l s='Phone:' mod='blockcontact'}</span>
                <a href="tel:+{$telnumber|escape:'html':'UTF-8'}">{$telnumber|escape:'html':'UTF-8'}</a>
                
            </p>
        {/if}

 

hope your issue is solved. Do not forget to click the love icon to  show your love :) and mark the post as solved if solved 

 

thank you

Link to comment
Share on other sites

15 hours ago, SmartDataSoft said:

@webdesign_ajnet

 

1.6.1.24\themes\default-bootstrap\modules\blockcontactinfos\blockcontactinfos.tpl line 40 

<span>{$blockcontactinfos_phone|escape:'html':'UTF-8'}</span>

to bellow it will call able no

<a href="tel:+{$blockcontactinfos_phone|escape:'html':'UTF-8'}">{$blockcontactinfos_phone|escape:'html':'UTF-8'}</a>

 

Thank you

I tried this solution and it didn't work 😕

Link to comment
Share on other sites

36 minutes ago, SmartDataSoft said:

Please clear cache from performance , and also server level. Sometime server has cache. It must 100% work. For you I install 1.6.1.24 and tested it. 

Also clear browser cache 

Thank you

I've cleared the cache everywhere, if you enter the link I sent, can you click on the phone number?

Link to comment
Share on other sites

5 minutes ago, SmartDataSoft said:

Please check this image. I also upload my modified file.  In my end all work fine.

 

The email work because their is a smarty function for email which work but i never found any function for phone. so i used normal normal html way

to work phone no.

 

Thank you

Screenshot_1.png

blockcontactinfos.zip 1.8 kB · 0 downloads

I don't know what I'm doing wrong! I've tried everything

 

image.png.297f1f57294bbcbebfba21cf5bd19f71.png

Link to comment
Share on other sites

2 minutes ago, SmartDataSoft said:

Please check the variable name is different it will be $blockcontactinfos_phone not the $telnumber

 

Thank you

Even so nothing happens...

I saw now that I put "Call: " but later on the website it still says "Call now:" (but in Portuguese)

Could it be in another file?

 

image.png.1a758e36e6b6226ea1c7e4776aacdcfc.png

Link to comment
Share on other sites

Please check where you modified , Theme or module file.

 

If any file is modified from theme module folder they will call from their first. Other wise load from module directly. I think you need to check from here you edit the file and is it default theme or other theme.

Thank you

 

 

Link to comment
Share on other sites

9 minutes ago, SmartDataSoft said:

Por favor, verifique onde você modificou, tema ou arquivo de módulo.

 

Se algum arquivo for modificado da pasta do módulo de tema, eles chamarão a partir do primeiro. Outro carregamento inteligente do módulo diretamente. Acho que você precisa verificar a partir daqui se você edita o arquivo e se é o tema padrão ou outro tema.

Obrigada

 

 

<!-- MODULE Block contact infos -->
<section id="block_contact_infos" class="footer-block col-xs-12 col-sm-4">
    <div>
        <h4>{l s='Store Information' mod='blockcontactinfos'}</h4>
        <ul class="toggle-footer">
            {if $blockcontactinfos_company != ''}
                <li>
                    <i class="icon-map-marker"></i>{$blockcontactinfos_company|escape:'html':'UTF-8'}{if $blockcontactinfos_address != ''}, {$blockcontactinfos_address|escape:'html':'UTF-8'}{/if}
                </li>
            {/if}
            {if $blockcontactinfos_phone != ''}
                <li>
                    <i class="icon-phone"></i>{l s='Call:' mod='blockcontactinfos'} 
                    <span>{$blockcontactinfos_phone|escape:'html':'UTF-8'}</span>
                    <a href="tel:+{$blockcontactinfos_phone|escape:'html':'UTF-8'}">{$telnumber|escape:'html':'UTF-8'}</a>
                </li>
            {/if}
            {if $blockcontactinfos_email != ''}
                <li>
                    <i class="icon-envelope-alt"></i>{l s='Email:' mod='blockcontactinfos'} 
                    <span>{mailto address=$blockcontactinfos_email|escape:'html':'UTF-8' encode="hex"}</span>
                </li>
            {/if}
        </ul>
    </div>
</section>
<!-- /MODULE Block contact infos -->
 

 

 

this is the final file but it still doesn't work

Link to comment
Share on other sites

Hello, If you send me pm with site access and ftp, i can check first. and help you to solve.  your code has mistake bellow is right one.

 

  {if $blockcontactinfos_phone != ''}
                <li>
                    <i class="icon-phone"></i>{l s='Call:' mod='blockcontactinfos'} 
                    <span>{$blockcontactinfos_phone|escape:'html':'UTF-8'}</span>
                    <a href="tel:+{$blockcontactinfos_phone|escape:'html':'UTF-8'}">{$blockcontactinfos_phone|escape:'html':'UTF-8'}</a>
                </li>
            {/if}

 

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...