Post by ehandelsfabriken » Wed Mar 09, 2011 6:25 pm

I'm trying to print out the stores contact information in footer.tpl with <?php echo $store; ?> and <?php echo $address; ?> but the code doesn't print it out. Why? Do I need to declare a varible for the footer template file? Because I've just copied the code from the contact.tpl file where it works great.

I'm using version of OC.

I'm using OpenCart

New member


Wed Mar 09, 2011 6:20 pm

Post by fido-x » Wed Mar 09, 2011 10:24 pm

Any variables you use in a template file need to be defined in the corresponding controller.

If you want to use <?php echo $store; ?> and <?php echo $address; ?> in the footer template file, they need to be defined in "catalog/controller/common/footer.php".

Code: Select all

$this->data['store'] = $this->config->get('config_name');
$this->data['address'] = nl2br($this->config->get('config_address')); 

Modules for OpenCart
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!

User avatar
Expert Member


Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by evopixel » Fri May 02, 2014 8:32 pm

Fantabulous explanation, cheers ;o)
I have implemented this in a vqmod 'Show store address in footer' see attachment.
Have fun :)



Mon Apr 28, 2014 4:20 pm

Post by evopixel » Fri May 02, 2014 8:36 pm more thing you need to add an address echo in your footer like this:
<?php echo $address; ?>

This works in version 1.5.6



Mon Apr 28, 2014 4:20 pm
Who is online

Users browsing this forum: No registered users and 3 guests