Post by LewisSellers » Mon Nov 12, 2012 7:58 pm

Hi There,

I've done a custom opencart template for a client of ours but we're wanting to make a slight change to their homepage footer.

At the minute, we have backlinks in to our company that appear across every page of their website. Ideally, what we want is this link to only appear on the homepage of their website in the footer, so we need a custom footer, or a custom statement that shows this text only on their websites homepage.

I don't really want to have to purchase a mod to do this, but thought a conditional statement or duplicating the footer may be possible?

Any help would be appreciated.

Kind regards,
Lewis

Newbie

Posts

Joined
Fri Jun 22, 2012 12:42 am

Post by MarketInSG » Tue Nov 13, 2012 9:31 am

http://www.opencart.com/index.php?route ... on_id=6788

This will allow you to display text on the footer. You can limit it to the layout 'home' to only display at home page.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by LewisSellers » Tue Nov 13, 2012 5:02 pm

Hi There,

I didn't really want to have to purchase a mod for this. I was hoping I could use a bit of PHP to say that If it was the homepage, show 'x', if not the homepage, show 'y'.

Does anyone know a way around this?

Many thanks,
Lewis

Newbie

Posts

Joined
Fri Jun 22, 2012 12:42 am

Post by MarketInSG » Wed Nov 14, 2012 12:35 pm

Code: Select all

if (!isset($this->request->get['route']) || $this->request->get['route'] == 'common/home'') {
sometimes, the money you spend on something simple would save you more time ;)


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by Lisaweb » Mon Jan 21, 2013 3:42 am

MarketInSG wrote:

Code: Select all

if (!isset($this->request->get['route']) || $this->request->get['route'] == 'common/home'') {
sometimes, the money you spend on something simple would save you more time ;)
Thanks so much for this! I have a custom theme that already has a custom footer enabled by the following code:

Code: Select all

<?php if($this->config->get('tg_evisu_footer_status') == '1'): ?>
How would I combine this code with it successfully? Is this correct?

Code: Select all

<?php if($this->config->get('tg_evisu_footer_status') == '1')
 AND (!isset($this->request->get['route']) || $this->request->get['route'] == 'common/home''): ?>
Thanks for any help anyone can provide!

Using OC v1.5.4.1 with Evisu Theme


User avatar
Active Member

Posts

Joined
Wed Dec 07, 2011 12:01 am

Post by mcamca » Wed Jan 23, 2013 1:45 am

Why dont you just add the link etc. to home.tpl for the theme your using at:
catalog/view/theme/YOUR THEME/template/common/home.tpl
eg:

Code: Select all

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
<h1 style="display: none;"><?php echo $heading_title; ?></h1>
<?php echo $content_bottom; ?></div>
<div>Put your code for your link etc and css to format here!</div>
<?php echo $footer; ?>

Active Member

Posts

Joined
Fri Aug 06, 2010 5:57 pm
Who is online

Users browsing this forum: No registered users and 32 guests