email link in footer

Open to all! Ask other shopowners for help.
Post Reply
GetSirius
Member
Posts: 50
Joined: Wed Mar 17, 2021 7:15 pm
Phoenix Version:
Has thanked: 14 times
Been thanked: 2 times

email link in footer

Post by GetSirius »

Hello,

I am trying to make the email link in the footer so that it is clickable. Can not find how to do that, tried searching here and editing files.
I edited english/modules/content/footer/cm_footer_contact_us.php, but replacing the contents of define('MODULE_CONTENT_FOOTER_CONTACT_US_EMAIL' only resulted in a second email address being displayed, the new clickable and the old non-clickable.
CE Phoenix v1.0.9.0

Help? Thank you!


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Re: email link in footer

Post by mhsuffolk »

IMO that is not a good idea to make that clickable. Screen skimmers will bombard you with spam. That is the benefit of the contact us page. The big green button just under your details in the footer does the trick.
GetSirius
Member
Posts: 50
Joined: Wed Mar 17, 2021 7:15 pm
Phoenix Version:
Has thanked: 14 times
Been thanked: 2 times

Re: email link in footer

Post by GetSirius »

Not worried about spam. My email has been on our website since 1989. On an osC cart for more than a decade. Where I have received annoying spam that does not get caught by filters is through the contact us page on osC 2.x. Had to delete the form. If I keep the form in Phoenix, I would still like to give people the option of how they want to contact us.

So, can anyone help me making the footer email link active?

Thank you in advance for any help in doing this.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: email link in footer

Post by heatherbell »

GetSirius wrote: Mon Mar 25, 2024 10:23 pmresulted in a second email address being displayed, the new clickable and the old non-clickable.
Sounds like you're already half way there. Just get rid of the bit you don't want. That's just a matter of DIY trial and error on your staging site. Otherwise difficult to help without knowing what code you have.
GetSirius
Member
Posts: 50
Joined: Wed Mar 17, 2021 7:15 pm
Phoenix Version:
Has thanked: 14 times
Been thanked: 2 times

Re: email link in footer

Post by GetSirius »

Thank you for the reply heatherbell. Yes, halfway there but that last mile appears to be too far.

I am using Phoenix v1.0.9.0. It seems odd to me that there is no choice of having an active link or not. I will likely remove the Contact Us page as that has caused me trouble in v2 osC.

Relevant code in english/modules/content/footer/cm_footer_contact_us.php:
define('MODULE_CONTENT_FOOTER_CONTACT_US_PHONE', '<i title="Telephone"></i>');
define('MODULE_CONTENT_FOOTER_CONTACT_US_EMAIL', ' ');

For someone's future reference should they find this page, here is one way to do it.

I removed everything from this define (not sure what to call it) and still my email address without a link is there, just not styled. If I add "something" in place of what was there, that "something" simply shows up before my email address, still no active link. If I remove the line, the footer fails to display. At this point, I gave up.

If I could make cm_footer_contact_us.php work as I want, I would do that. Since I can not, I removed the Contact Us Details from the footer, expanded the Text Block (so I can keep the existing text), and just put the needed info there inside a box floated left using CSS. It works, and there is no hack to files.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: email link in footer

Post by heatherbell »

GetSirius wrote: Fri Mar 29, 2024 10:11 pmIt seems odd to me that there is no choice of having an active link or not.
IMO it would seem odd if there was that choice. Mailto e-mail links are not the best UX.
Some users have more than one mail app and the link just uses whichever has been setup as the default, without giving them the option to use any other.
If users don’t have an email application set up, the link can take them to a dead end or down a rabbit hole.
IMO the Contact Us form with a Captcha (plenty of choice in the Addons Library) is the better solution.

Changing the define (AKA constant) in the module language file will not usually change the functionality of the module.
It is for language and in this file, it only defines the Icon. The e-mail address is already defined in My Store configuration. https://phoenixcart.org/phoenixcartwiki ... e=My_Store

In this case, the module tpl_ file should be copied, edited as desired and saved to the template used in your store so core files are not changed.
https://phoenixcart.org/phoenixcartwiki ... a_Template
The following line in the tpl_ file ouputs the icon and e-mail address:
https://github.com/CE-PhoenixCart/Phoen ... _us.php#L7
So, if you wish to pursue, edit that line to do what you want.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply