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 1.4.9.3 of OC.
I'm using version 1.4.9.3 of OC.
I'm using OpenCart 1.5.1.3
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".
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 2.3.0.2
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!
Fantabulous explanation, cheers ;o)
I have implemented this in a vqmod 'Show store address in footer' see attachment.
Have fun
I have implemented this in a vqmod 'Show store address in footer' see attachment.
Have fun

Who is online
Users browsing this forum: No registered users and 25 guests