Post by prxbl » Sat Feb 17, 2018 5:39 pm

I would like the footer from the product pages to contain a text with the product model. I searched the forum and I found a similar request viewtopic.php?f=21&t=58217 for OC 1.5. I've tried that code but after modifying /catalog/controller/common/footer.php I get a series of bad characters in my frontend.
,s:�33�&�A�2f��|��M���9 žc=}�Z�
I know I need to modify /catalog/controller/common/footer.php to add a function that will check if the path corresponds to a product page and then storing the product model inside a variable $footer_model . But I don't know how to do it.

Then in footer.tpl I could add something like this to echo that variable if present:

Code: Select all

    <?php if (isset($footer_model)) { echo $footer_model; } ?>
Any help is appreciated, thank you!

Newbie

Posts

Joined
Tue Sep 08, 2015 2:03 pm

Post by straightlight » Sat Feb 17, 2018 10:13 pm

From this post: viewtopic.php?f=21&t=58217#p272247 , simply replace all instances of:

Code: Select all

$this->data
with:

Code: Select all

$data

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by prxbl » Sun Feb 18, 2018 5:28 pm

Thanks, it's working now!

Newbie

Posts

Joined
Tue Sep 08, 2015 2:03 pm
Who is online

Users browsing this forum: No registered users and 10 guests