Post by softfocus » Wed Dec 14, 2011 12:37 am

Hi,
I would like to add the the code below to enable a contact link in my header.

Code: Select all

 <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
I then get this error in my header
Notice: Undefined variable: text_contact in /home/www/opencart/catalog/view/theme/shoppica/template/common/header.tpl on line 163
I have added the code below to my header.php but nothing.. anyone know how I can add variable to the header.tpl?

Code: Select all

$_['text_contact']  = 'Contact Us';
Thanks!

Newbie

Posts

Joined
Wed Dec 14, 2011 12:33 am

Post by inactiveaccount9912 » Wed Dec 14, 2011 2:26 am

You also need to add this line to catalog/controller/header.php

Code: Select all

	$this->data['text_contact'] = $this->language->get('text_contact');

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by raix022 » Tue Feb 02, 2016 10:55 pm

I use opencart 2.0

Where do I need add that code in header?

Newbie

Posts

Joined
Thu Dec 04, 2014 7:01 pm

Post by IP_CAM » Wed Feb 03, 2016 1:02 pm

For Opencart v.1.5.6.x, it can be seen here:
http://www.openshop.li

Ernie ;)

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 9 guests