Post by rhorne » Tue Feb 13, 2018 11:41 pm

Hey guys.

When a user searches for a product on our site and finds nothing they see whatever text is assigned to the text_empty variable in my language file.

For our website, this is "Cant' find what you're looking for? Contact us for a quote."

I want to make the Contact Us text a hyperlink to our contact page, and of course I've tried adding this to the string, but it doesn't make the text a hyperlink. It's just rendered as plain text in a box. It changes colour but doesn't act as a hyperlink.

Any ideas how to fix this?

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by uksitebuilder » Wed Feb 14, 2018 6:04 am

In your language file, the text_empty variable should be like this:

Code: Select all

$_['text_empty']        = 'Can\'t find what you\'re looking for? <a href="index.php?route=information/contact">Contact us</a> for a quote.';

User avatar
Guru Member

Posts

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

Post by rhorne » Wed Feb 14, 2018 4:26 pm

Hello and thanks for your reply. I have tried just that but the hyperlink, while clearly there - I can see it when I inspect the element - just isn't working. See for yourself:

http://www.wyedeanstores.com/

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by uksitebuilder » Wed Feb 14, 2018 4:38 pm

Working for me.

Looks a very similar colour to the normal text though. You may want to change that in the CSS so that your links stand out more. Either change the colour, add an underline or both.

User avatar
Guru Member

Posts

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

Post by rhorne » Wed Feb 14, 2018 5:53 pm

Weird. For me in Chrome and Internet Explorer I can see the difference in colour between the texts but Contact Us isn't clickable, nor does the mouse cursor change to indicate a hyperlink.

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by paulfeakins » Wed Feb 14, 2018 6:46 pm

Works for me in Firefox and Chrome.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: Mike Guenther and 231 guests