Forums / Templates, Stylesheets, Page Layout / Want to add image on main page near footer...

Want to add image on main page near footer...

Locked

Started by gourmets on 12 Jan 2008, 8:43 PM · Views: 7,591

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
12 Jan 2008, 8:43 PM
#1
gourmets avatar

gourmets

New Zenner

Join Date:
Jan 2007
Posts:
61
Plugin Contributions:
0

Want to add image on main page near footer...

My site is www.gourmetshoppe.net I'm very php illiterate so I need help LOL
Down near my footer bar, either directly above it or directly below it, overtop of the copyright line, I want to add a small image and some text. This is to be a small picture of my store location and address,hours and phone number, so nothing too big or obvious, just informational. Like I said, I know nothing about php or how to customize it so before I screw something up, I'm hoping someone can tell me what file I need to edit and what kind of edits I need to make. Since it is written in php, there must be some sort of end php tags, make new area then start php tags again to add, I just dont know what they are. Can anyone help, or provide me a little bit of code where I can add in this small area? Thanks! :smile:

12 Jan 2008, 10:30 PM
#3
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Want to add image on main page near footer...

Directly below the footer would be a little easier to get it to display correctly on every page. Then again, directly above it may look a little better if you have a picture of your store.

You could open includes/templates/template_default/common/tpl_main_page.php

and find this:

</table>

<?php
 /**
  * prepares and displays footer output
  *
  */
  if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_footer = true;
  }
  require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');
?>

then add a div with the information you want just after the </table> and before the <?php

<div style="float:left;width:200px'>
<address>
My Store
Address
City, ST  Zip
</address>
<img src="location_of_your_store_image.jpg" style="float:right">
</div>

You may need to adjust the width of the div a bit to get the right effect. After editing the tpl_main_page.php it is best if you can save the edited file under includes/templates/CUSTOM_TEMPLATE/common so that future upgrades will not over write your customizations.

Also the more professional way to work with this div is to create a <div id="storeInfo"> instead of <div style=""> and put an id in the style sheet called #storeInfo{float:left;width:200px}

12 Jan 2008, 10:52 PM
#4
gourmets avatar

gourmets

New Zenner

Join Date:
Jan 2007
Posts:
61
Plugin Contributions:
0

Re: Want to add image on main page near footer...

Thank you VERY much rainthebat....thats exactly what I was looking for. However, a quick question. Is there anyway easy to have this show up only on the main index page? I'd rather not have it show on every page within the site. Thanks!

12 Jan 2008, 11:01 PM
#5
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Want to add image on main page near footer...

Oh, I was thinking you wanted it on every page!. If just the Main Page is the only page you want it on, you might be able to move that code directly to includes/languages/english/html_includes/define_main_page.php and put it at the bottom.

Only thing is, if you start displaying featured products, new products, specials on the main page, they will appear after that, and it may not look good. There is a way around that too, but I am having a major brain fart!

13 Jan 2008, 2:13 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Want to add image on main page near footer...

Probably the best way around that is to use the Banner Manager as Shackle advised (link in post 2).
There are three potential footer locations.
Look in Configuration > Layout Settings >
Banner Display Groups - Footer Position 1
Banner Display Groups - Footer Position 2
Banner Display Groups - Footer Position 3

You can manage the content in Tools > Banner Manager.

Try out a few simple things and see how they work; then you can make a gif with the info and layout you want.

13 Jan 2008, 3:20 PM
#7
gourmets avatar

gourmets

New Zenner

Join Date:
Jan 2007
Posts:
61
Plugin Contributions:
0

Re: Want to add image on main page near footer...

Thanks for the help all. I was able to very easily use the banner manager after all to add my info. However, it is still showing on every page and on some of the pages with no featured/ new items, etc. it looks funny to be so close to the categories...so if anyone can tell me if there is any way to make this banner show only on the main page, I'd appreciate it! :smile:

13 Jan 2008, 4:58 PM
#8
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Want to add image on main page near footer...

Nevermind. That looks really good at the bottom there.

13 Jan 2008, 11:54 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Want to add image on main page near footer...

You will need to edit /includes/templates/your_template/common/tpl_main_page.php for the home page option.
Find at the bottom of the file

<!--bof- banner #6 display -->
<?php
  if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
    if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
    }
  }
?>
<!--eof- banner #6 display -->
</body>

Add

$this_is_home_page and

to get

<!--bof- banner #6 display -->
<?php
  if ($this_is_home_page and SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
    if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
    }
  }
?>
<!--eof- banner #6 display -->
</body>
30 Jan 2008, 6:30 AM
#10
siditty avatar

siditty

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: Want to add image on main page near footer...

when do you see the chages to my custom stylesheet. I don´tw see them in my admin screen , so there must be another mode that I´ve missed.

30 Jan 2008, 7:51 AM
#11
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Want to add image on main page near footer...

Not quite clear on what you are asking...

If you mean "how do we see your stylesheet", most of us use tools like the Firefox Web Developer extension, which has a "View CSS" button that displays the stylesheets in use on the current page. You can install the Web Developer too (free from Mozilla/Firefox, or from https://www.chrispederick.com), and have much easier control of what you are doing with your site's layout.

If you are talking about something else, you will have to explain better.

12 Feb 2008, 10:48 AM
#12
dashriprock avatar

dashriprock

New Zenner

Join Date:
Jan 2008
Posts:
7
Plugin Contributions:
0

Re: Want to add image on main page near footer...

Hi, I'm kinda pulling my hair out here. I added a footer banner, and need it on the home page only, as the other user did. I copied the code:

$this_is_home_page and

(to /includes/templates/omni/common/tpl_main_page.php)

and I've checked it a dozen times and it's right, but I'm still getting the banner on every page. It's 5:27am and I've been up all night and may be missing something very obvious, but could someone please help me ?

Thanks,

Jeff

BTW...I'm not getting any errors or anything
just getting the banner on every page.

Zen Cart - The Yin & Yang of the eCommerce Thang

**OmniProductSales.com


**

12 Feb 2008, 4:49 PM
#13
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Want to add image on main page near footer...

You are using banner position four, not position six, so you need to add the switch code around the

<div id="bannerFour"

section in tpl_main_page.php.

13 Feb 2008, 2:22 AM
#14
dashriprock avatar

dashriprock

New Zenner

Join Date:
Jan 2008
Posts:
7
Plugin Contributions:
0

Re: Want to add image on main page near footer...

I was reluctent to ask at the risk of looking like an idiot....I was right.

Thanks,

Glenn

Zen Cart - The Yin & Yang of the eCommerce Thang

**OmniProductSales.com


**

28 Feb 2008, 12:01 AM
#15
ballyc27 avatar

ballyc27

New Zenner

Join Date:
Sep 2007
Posts:
65
Plugin Contributions:
0

Re: Want to add image on main page near footer...

Hi,
I'm looking for something like gourmets except I only want it (text with link) to appear at the end of a category page/listing. This example text should give you an idea what I mean:
"Cant find what you need? Try 'LINK TO SITE/PAGE"

How do I achieve this?
Thanks.