Post by webernetic.by » Thu Jun 27, 2019 8:30 pm

Hi. I need to display a separate footer on the main page of the site. How to do this?

Newbie

Posts

Joined
Thu Jul 05, 2018 2:23 pm

Post by Dreamvention » Thu Jun 27, 2019 10:29 pm

You can create a variable, which can be accessed only on your home page and check if it exists - so load one fotter, if not - load another.

Many OpenCart users struggle to find quality extensions. We know how frustrating the need to fix the shop is just because of one poorly coded extension. We created quality OpenCart Extensions, tested by real developers and provide professional support.

AJAX QUICK CHECKOUT - #1 one-page checkout solution
VISUAL DESIGNER - Page builder for Opencart
View more extensions here

Tested by Shopunity.net


User avatar
Administrator

Posts

Joined
Sun Jun 17, 2012 7:04 pm
Location - Europe

Post by letxobnav » Thu Jun 27, 2019 10:38 pm

Create a new footer controller, a new footer view and new footer language files, let's call them footer_home
Best way is to copy and adjust the contents of the current ones:

Code: Select all

catalog/controller/common/footer.php
catalog/view/theme/default/template/common/footer.twig
catalog/language/XX/footer.php
in catalog/controller/common/home.php you change the footer construction call from

Code: Select all

$data['footer'] = $this->load->controller('common/footer');
to

Code: Select all

$data['footer'] = $this->load->controller('common/footer_home');

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: No registered users and 3 guests