Page 1 of 1

Contact Us - how to show email address on page?

Posted: Fri May 14, 2010 9:01 am
by Moggin
I'd like to show our email address on the 'contact us' page.

There's a line of code for the email address in the language/english/information/contact.php file, but it doesn't render on the page. I've tinkered with mytheme/information/contact.tpl, and catalog/controller/information/contact.php files, but to no avail. Please, can anyone help?
Thank you.

Re: Contact Us - how to show email address on page?

Posted: Sun May 08, 2011 8:07 am
by jeet123
anyone with help to show Email Address on contact us page, I tried to edit contact.tpl, did change the contact.php under controller too but no success...

anyone has idea, why its not working....

appreciate.... thanks

Re: Contact Us - how to show email address on page?

Posted: Sun May 08, 2011 5:19 pm
by jcsmithy
In the contact.tpl file, add...

Code: Select all

<?php echo $this->config->get('config_email'); ?>

Re: Contact Us - how to show email address on page?

Posted: Sun May 08, 2011 5:56 pm
by SapporoGuy
I wouldn't actually post your email on your site.
spam harvesters will get it.

Maybe you could offer to show it to only those who are logged in?

Re: Contact Us - how to show email address on page?

Posted: Mon May 09, 2011 1:01 pm
by Sidecutter
I'd back up SapporoGuy on this. Displaying your e-mail openly is a bad idea, because there are crawlers that will harvest it for spam lists. That's why there's a contact form.

Re: Contact Us - how to show email address on page?

Posted: Mon May 09, 2011 9:22 pm
by Moggin
yeah it's true, if you publish your email address you can expect spam! Our email addr has been online for so many years, it's neither here nor there to us, and all spam is efficiently swallowed up. Each to his (her) own.

I first started this thread a year ago and we took the lazy way, and hardcoded it in for our own site 8) v bad practice

Re: Contact Us - how to show email address on page?

Posted: Fri Oct 21, 2011 6:59 pm
by Nybster
Hi.

I'm trying to show the e-mail on the contact page as well, but don't seem to get the code right to retrieve the correct information (ie, the actual address).

I've meddled with the contact files in View, and Controller as well as languages.

Here's the code I've got in view for this bit:

Code: Select all

  <div class="middle">
    <form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="contact">
      <div class="content">
        <div style="display: inline-block; width: 100%;">
          <div style="float: left; display: inline-block; width: 50%;"><b><?php echo $text_email; ?></b><br />
            <?php echo $email; ?><br /></div>
          <div style="float: right; display: inline-block; width: 50%;">
If I replace the line <?php echo $email; ?><br /></div> for <?php echo $address; ?><br /></div> for example it works fine, but as it is, it doesn't retrieve the actual e-mail address. It just shows nothing under the text_mail (which it shows).

Can you help?

N

Re: Contact Us - how to show email address on page?

Posted: Mon Oct 24, 2011 12:59 am
by uksitebuilder
If you really want to show it, I suggest creating an image with your email on.

Then link to the image in your contact template.

Alternatively, you can install re-captcha (i think there's an extension) with that you can adda link to 'view email' which will show the email address after a successful captcha challenge

Re: Contact Us - how to show email address on page?

Posted: Mon Oct 24, 2011 8:40 pm
by Nybster
Thanks for the help

N