Jump to content

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.

Link to comment
Share on other sites

  • 3 months later...
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

Link to comment
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
Link to comment
Share on other sites

  • 1 year later...

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

 

Link to comment
Share on other sites

  • 3 years later...

I've spent about an hour on this issue but modifying the two templates, clearing cache with forced recompile, two browsers, clearing their cache hasn't helped.

When I use Inspect Elements, I see:

Screenshot2024-04-29at09_47_25.png.22b52e632fccf96f30ea1cc6044c0161.png

 

How do I clear "required from "class="control-label col-lg-3 required"? I think that would work but I cannot find it in the CSS, so guessing it's a template but which one?

 

Thanks.

 

Link to comment
Share on other sites

  • 4 months later...
On 4/29/2024 at 9:58 AM, Walrus said:

I've spent about an hour on this issue but modifying the two templates, clearing cache with forced recompile, two browsers, clearing their cache hasn't helped.

When I use Inspect Elements, I see:

Screenshot2024-04-29at09_47_25.png.22b52e632fccf96f30ea1cc6044c0161.png

 

How do I clear "required from "class="control-label col-lg-3 required"? I think that would work but I cannot find it in the CSS, so guessing it's a template but which one?

 

Thanks.

 

In PS 8 locate the code in the directories and add this to the beginning <!---- and this ----> to end of code as below:

/public_html/themes/YOURTHEME/modules/ps_contactinfo/ps_contactinfo-rich.tpl (Replace YOURTHEME with your theme)


<!----{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}---->

/public_html/themes/YOURTHEME/modules/ps_contactinfo/ps_contactinfo.tpl (Replace YOURTHEME with your theme)

<!----{if $contact_infos.email}
        <br>
        {* [1][/1] is for a HTML tag. *}
        {l
          s='Email us: [1]%email%[/1]'
          sprintf=[
            '[1]' => '<span>',
            '[/1]' => '</span>',
            '%email%' => $contact_infos.email
          ]
          d='Shop.Theme.Global'
        }
      {/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...