To make Contact Us information as links?

Tagged: , ,

ThemeBurn SupportForumsOpenCart ThemesShoppica OpenCart ThemeTo make Contact Us information as links?

This topic has been marked as resolved.

How to make that phone number, email or Skype name on Contact Us section to work as links, it is that they allow you to directly call or write an email? You probably realize that it is important to me on the mobile version of your wonderful theme. It would be very nice if this could be done by clicking on the icons. I would be very grateful if you could help.

  • This reply was modified 4341 days ago by  vorsta.
  • This reply was modified 4341 days ago by  vorsta.
 vorsta
June 14, 2012 at 12:51 pm #10321

Yeah, that’s a good question, I would like to know too.

 lewys
June 14, 2012 at 1:50 pm #10329

We recently did this quite easily.

The file you need is catalog/view/theme/Shoppica2/template/common/footer.tpl. You then find the e-mail, skype etc on that .tpl file – the headings of About us, contact etc are between h2 tags.

You can then add a link to these h2 tags so your customers can click on them. We made About Us, Contact and e-mail and skype all clickable.

Hope this helps!

  • This reply was modified 4341 days ago by  yumasia.
  • This reply was modified 4341 days ago by  yumasia.
June 14, 2012 at 3:06 pm #10334

Maybe I am very stupid but I didn’t understand any of that……

 vorsta
June 14, 2012 at 9:38 pm #10370

Hi Vorsta,

You’re not stupid :) We’re all at different levels of knowledge. 3 months ago I would’ve been in the same boat as you. I must say, I was surprised the email links weren’t active by default.

Here’s how I fixed it:
1. Go to line 55 of the catalog/view/theme/Shoppica2/template/common/footer.tpl file.
2. Change the code <?php echo $footerInfo['email1']; ?> <?php echo '<br />' . $footerInfo['email2']; ?> to <a href="mailto:<?php echo $footerInfo['email1']; ?>"><?php echo $footerInfo['email1']; ?></a> <a href="mailto:<?php echo $footerInfo['email1']; ?>"><?php echo $footerInfo['email1']; ?></a>.

As yumasia said, you can make any of the php tags active links by wrapping them in an <a> element. The only difference between email and other links is the inclusion on “mailto:”.

Hope this helps. Cheers!

June 15, 2012 at 2:29 am #10384

Oops! There was an error in my code (duplicated the ‘email1′ field). Use this one instead:

<a href="mailto:<?php echo $footerInfo['email1']; ?>"><?php echo $footerInfo['email1']; ?></a> <a href="mailto:<?php echo $footerInfo['email2']; ?>"><?php echo $footerInfo['email2']; ?></a>

June 15, 2012 at 2:30 am #10385

Me again. I just read through your initial query properly.

To make your icons active links you need to wrap them in an <a> element and use their respective php tag. Note that you can only assign one link to an icon i.e. email1 or email2

Email would be:
Line 54:

<a href="mailto:<?php echo $footerInfo['email1']; ?>"><span class="s_icon s_mail_32"></span></a>

Skype would be:
Line 64:

<a href="skype:<?php echo $footerInfo['skypename1']; ?>?call"><span class="s_icon s_skype_32"></span></a>
<a href="skype:<?php echo $footerInfo['skypename1']; ?>?call"><?php echo $footerInfo['skypename1']; ?></a> <a href="skype:<?php echo $footerInfo['skypename2']; ?>?call"><?php echo '<br />' . $footerInfo['skypename2']; ?></a>

Phone numbers (handy for mobile browsers) could also be done but you have to strip out any spaces. This is beyond my PHP knowledge, sorry.

June 15, 2012 at 3:29 am #10388

Thanks a lot, you’re awesome!!!!!

 vorsta
June 16, 2012 at 10:59 am #10433

We will do this as an option for future updates.

Generally, we haven’t made the email as an active link yet to keep it from being harvested by spam bots.

@JoelEade

Thanks for the help, mate. Much appreciated!

Best,
ThemeBurn team

June 18, 2012 at 4:43 pm #10508

You’re welcome! Glad to be able to help.

June 19, 2012 at 2:50 am #10532
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.