Post by Moggin » Fri May 14, 2010 9:01 am

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.

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by jeet123 » Sun May 08, 2011 8:07 am

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

[:: Jeet Kumar ::}


Newbie

Posts

Joined
Sun May 08, 2011 8:06 am

Post by jcsmithy » Sun May 08, 2011 5:19 pm

In the contact.tpl file, add...

Code: Select all

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

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by SapporoGuy » Sun May 08, 2011 5:56 pm

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?

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by Sidecutter » Mon May 09, 2011 1:01 pm

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.

Active Member

Posts

Joined
Tue Jan 18, 2011 6:58 am

Post by Moggin » Mon May 09, 2011 9:22 pm

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

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by Nybster » Fri Oct 21, 2011 6:59 pm

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

Newbie

Posts

Joined
Tue Oct 11, 2011 8:57 pm

Post by uksitebuilder » Mon Oct 24, 2011 12:59 am

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

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Nybster » Mon Oct 24, 2011 8:40 pm

Thanks for the help

N

Newbie

Posts

Joined
Tue Oct 11, 2011 8:57 pm
Who is online

Users browsing this forum: simple-opencart and 77 guests