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.
|
|
Yeah, that’s a good question, I would like to know too.
|
|
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.
|
|
Maybe I am very stupid but I didn’t understand any of that……
|
|
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!
|
|
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>
|
|
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.
|
|
Thanks a lot, you’re awesome!!!!!
|
|
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
|
|
You’re welcome! Glad to be able to help.
|
|