Forums / Templates, Stylesheets, Page Layout / Need help with adding pic to home page.

Need help with adding pic to home page.

Locked

Views: 936

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
22 Mar 2009, 3:09 AM
#1
spazzles avatar

spazzles

New Zenner

Join Date:
Mar 2009
Posts:
3
Plugin Contributions:
0

Need help with adding pic to home page.

I am totally new at this and have no idea how to do what I want to do. I want to put a picture in the center of my home page. It will be above the center boxes, and between the side boxes. Now in my stupid actions, I deleted the zencart pic that was there. I have no idea where or how to set up a code to be able to put this in. Can someone help me?

22 Mar 2009, 3:46 AM
#2
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Need help with adding pic to home page.

if you new to zencart, i strongly suggest following override tutorials as well as securing your zencart .

in order to add your own image in main page . go to admin

on tool bar select Tools > define pages editor

from option menu , select , define_main_page.php
this is a place you want to add your image and or any other info that you wish to display in main page .

hope this helps

22 Mar 2009, 7:14 AM
#3
spazzles avatar

spazzles

New Zenner

Join Date:
Mar 2009
Posts:
3
Plugin Contributions:
0

Re: Need help with adding pic to home page.

I have tried what you advised already. I can add text, but I do not know how to add an image. It could be that I do not know how to enter it correctly. I can simply add text, but the image is the real issue. Is there a code structure to use to add the image?

22 Mar 2009, 11:36 AM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Need help with adding pic to home page.

I do what you're trying to do, using the method Tony mentioned above. In my case I use a product image, so the code below includes a category id and a product id so you can click the image to go to the product. After that, one of my large images is referenced. But you could just code in your own image and ignore the HREF part if you don't want to use the image as a link.

<div class="home-img">
<a href="http://www.YOUR-SITE.com/index.php?main_page=product_info&cPath=80_95&products_id=456"><img src="images/large/IMAGE-NAME.jpg" alt="" title="" border="0" /></a>

<h4 class="center">SOME TEXT HERE IF NEEDED</h4>
</div>

Put one or two <br /> tags above and below the image to space it out. Also, notice I coded in a DIV with a class name. That makes it possible for me to style the image. I mainly use that to make sure it centers in the space available, but there's lots of things you could do with that.

Rob

Breakfast: the most important donut of the day.

22 Mar 2009, 4:19 PM
#5
spazzles avatar

spazzles

New Zenner

Join Date:
Mar 2009
Posts:
3
Plugin Contributions:
0

Re: Need help with adding pic to home page.

Thank you for your help, but I am still having an issue. I am not much of a coder, and I happened to delete the example that had the zencart image placed in the area above the center boxes. This is the coding I need to be able to put my image in that spot. I am sorry for being a pain, but I have gone over every FAQ, checked every possible help page I could find, and I am still at a loss. If anyone can direct me in as simple of a way that they can to fix this, it would help me even more. I know the solution must be an easy one, I just can't seem to get it.

22 Mar 2009, 5:13 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Need help with adding pic to home page.

The Sugar Donut gave you the code you need, but you might want to go the Zencart zip file, extract includes/languages/english/html_includes/define_main_page.php, and upload it to the same folder on your site, overriding the file you have there now. That will give you the original page back, and you can see how that image was coded.