Jump to content
Tanatus

Remove / Hide email address in Store information on the front office

Recommended Posts

Hi to everyone!

I'm thinking of removing / hiding my store email address from the PrestaShop 1.7 front office, from Store Information module.

How can I do it in the best way?

My aim is to hide my email from spamming bots. Especially if my customers will receive store emails from this email address, and probably respond to it.

Have no idea why PS developer team does not allow to hide or do not show my store email. I understand that in some countries this could be some sort of legislation requirement, but PS is an international CMS and such option should be included, IMHO.

Any ideas or recommendations are welcomed.

Share this post


Link to post
Share on other sites
15 hours ago, Crezzur said:

Are you using the classic theme?

Yes, PS 1.7 classic theme.

Share this post


Link to post
Share on other sites

Prestashop version: 1.7+
Theme: Prestashop classic

Remove e-mail from footer:
Open file: www/themes/classic/modules/ps_contactinfo/ps_contactinfo.tpl
Remove the code shown below from the file:

      {if $contact_infos.email}
        <br>
        {* [1][/1] is for a HTML tag. *}
        {l
          s='Email us: [1]%email%[/1]'
          sprintf=[
            '[1]' => '<a href="mailto:'|cat:$contact_infos.email|cat:'" class="dropdown">',
            '[/1]' => '</a>',
            '%email%' => $contact_infos.email
          ]
          d='Shop.Theme.Global'
        }
      {/if}

footer.jpg.3b94ce8480edce0da933922581858e47.jpg

Remove e-mail from contact-us page:
Open file: www/themes/classic/modules/ps_contactinfo/ ps_contactinfo-rich.tpl
Remove the code shown below from the file:

  {if $contact_infos.email}
    <hr/>
    <div class="block">
      <div class="icon"><i class="material-icons">&#xE158;</i></div>
      <div class="data email">
        {l s='Email us:' d='Shop.Theme.Global'}<br/>
       </div>
       <a href="mailto:{$contact_infos.email}">{$contact_infos.email}</a>
    </div>
  {/if}

contactus.jpg.635a63b7d6d3b3149fb201eaee884e3e.jpg

WARNING: Make sure to clear your CACHE, press CTRL+F5 when you are on your front office. Failing to do so will result in see no changes.

Hit the like button of this post if this solved your issue, it will encourage the community to keep helping.

Edited by Crezzur (see edit history)
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
On 1/5/2019 at 1:14 PM, Crezzur said:

Prestashop version: 1.7+
Theme: Prestashop classic

Remove e-mail from footer:
Open file: www/themes/classic/modules/ps_contactinfo/ps_contactinfo.tpl
Remove the code shown below from the file:


      {if $contact_infos.email}
        <br>
        {* [1][/1] is for a HTML tag. *}
        {l
          s='Email us: [1]%email%[/1]'
          sprintf=[
            '[1]' => '<a href="mailto:'|cat:$contact_infos.email|cat:'" class="dropdown">',
            '[/1]' => '</a>',
            '%email%' => $contact_infos.email
          ]
          d='Shop.Theme.Global'
        }
      {/if}

footer.jpg.3b94ce8480edce0da933922581858e47.jpg

Remove e-mail from contact-us page:
Open file: www/themes/classic/modules/ps_contactinfo/ps_contactinfo.tpl
Remove the code shown below from the file:


  {if $contact_infos.email}
    <hr/>
    <div class="block">
      <div class="icon"><i class="material-icons">&#xE158;</i></div>
      <div class="data email">
        {l s='Email us:' d='Shop.Theme.Global'}<br/>
       </div>
       <a href="mailto:{$contact_infos.email}">{$contact_infos.email}</a>
    </div>
  {/if}

WARNING: Make sure to clear your CACHE, press CTRL+F5 when you are on your front office. Failing to do so will result in see no changes.

Hit the like button of this post if this solved your issue, it will encourage the community to keep helping.

Hi Crezzur,

I cannot find the file www/themes/classic/modules/ps_contactinfo/ps_contactinfo.tpl

This path seems to be referring to PS 1.6 rather then PS 1.7

Any ideas? My PS version is 1.7.5.1

Thank you

Share this post


Link to post
Share on other sites

Hi, The file path is same for PS version 1.7.5.1 too. 
You can find the file in root_dir/themes/classic/modules/ps_contactinfo/ps_contactinfo.tpl.

  • Like 1

Share this post


Link to post
Share on other sites

Hi,

I finally found it, thank you. I think I was looking into the wrong folder.

However if you want to remove the email address from the contact-us form, the file to be updated is ps_contactinfo-rich.tpl and not ps_contactinfo.tpl. They both are in the same folder:

root_dir/themes/classic/modules/ps_contactinfo/ps_contactinfo.tpl for the footer

root_dir/themes/classic/modules/ps_contactinfo/ps_contactinfo-rich.tpl for the contact-us form

 

Edited by fab68 (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Please note that, in all cases where working with html, you can "comment out" rather than delete.  This makes reintroducing much simpler in the future and ensures that any future editor of the code can see what you have done.

Simply add

<!----

before

and

---->

after

 

This will leave the code in place but ensure it does not render.  If you are using a decent html editor (hint: notepad++) then you will see the colour change for the code you have commented out.


For this example I have

 

<!---- {if $contact_infos.email}
    <hr/>
    <div class="block">
      <div class="icon"><i class="material-icons">&#xE158;</i></div>
      <div class="data email">
        {l s='Email us:' d='Shop.Theme.Global'}<br/>
       </div>
       <a href="mailto:{$contact_infos.email}">{$contact_infos.email}</a>
    </div>
  {/if} ---->

 

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More