Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Can this be my ZenCart home page?

Can this be my ZenCart home page?

Locked

Views: 2,550

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
29 Sep 2007, 7:21 AM
#1
vood avatar

vood

New Zenner

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

Can this be my ZenCart home page?

Sorry to be such a pest y'all. I am really struggling with what I'm trying to do because I'm super new to php. I'm pretty ok with HTML and below average with CSS. Anywho, I want my ZenCart 'Home' page to be just like this

http://www.thelotetree.com.

This is the website that I started to design and then realized that I was in way over my head with doing my own shopping cart. I can't afford to have someone do it for me....so. I'm sure you've heard the sob story before.

It's ok if the ZenCart footer stays there, but I want the menu bar at the top, no boxes on the side except for maybe a fly-out product category list or something for just category/product navigation.

I want all the rest of my ZenCart pages to look like this too, with the exception of turning on some of the boxes on the left side for links and shopping cart info and such. The body of all of the other pages is great.

I think I can use the EZ pages for adding the "About Us" and other special pages. So the Home page is my main problem.

To sum...

1.) I would like to have the image map on the home page body.
2.) I would like some type of drop-down menu at the top of all pages.
3.) I would like to replace the sideboxes, only on the home page, with a flyout menu or something for product category selection.

I hope that this is not too much stuff for one post. Go ahead and chew me out if you want. I can take it! I really need to get this shop online before my wife kills me!!:lookaroun

Thanks mucho!
Voos

29 Sep 2007, 11:06 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can this be my ZenCart home page?

Have a look at the includes/templates/template_default/common/tpl_main_page.php file

There are several conditions outlined in the initial comments that you can mix match or alter to change the home page look and have other things on subsequent pages. You can view and possibly use some of the things for css per page that are outlined in css_read_me.txt file.

29 Sep 2007, 7:00 PM
#3
vood avatar

vood

New Zenner

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

Re: Can this be my ZenCart home page?

In that file, it says to create a directory as follows...

template/my_template/privacy/ and to put the tpl_main_page.php file there

My CUSTOM directories are named "wallet".

I'm confused. When I set up my overides, I created a directory templates/wallet/templates/ and have been storing my edited templates there.

Should I store the file in templates/wallet/templates/index/

or store it in templates/my_templates/index 'where my_templates is a new directory that I should create directly under 'templates'? Thanks.

Vood

29 Sep 2007, 7:27 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Can this be my ZenCart home page?

"my_template" or "your_template" or any similar name is intended as a placeholder for whatever you have named your custom template directory.

So you would put this as

/includes/templates/wallet/privacy/tpl_main_page.php.

29 Sep 2007, 7:31 PM
#5
vood avatar

vood

New Zenner

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

Re: Can this be my ZenCart home page?

Ok awsome! I think I'm really messed up on something else.

When I uncomment the following in tpl_main_page.php....

  • $flag_disable_left = true;<br />

Everything but my background goes away. What have I done now!!!

Vood

29 Sep 2007, 7:38 PM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Can this be my ZenCart home page?

That one is in the middle of a comment block. You need to end the comments before that line and restart them ( comment / live code / comment ), or else copy the code into the live PHP area below the comments:

$flag_disable_left = true;

29 Sep 2007, 7:46 PM
#7
vood avatar

vood

New Zenner

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

Re: Can this be my ZenCart home page?

I did that but I used / before and / after. I see that that was the problem. I told you...I'm really new (and a little slow too). Thanks very much.

By the way. Like your site. Do you make your own jewelry? Ever consider selling/making some Bahai symbols. They are becoming more and more popular these days. Nine pointed star is the main symbol. Very Cool!!! Later on!

Vood

29 Sep 2007, 7:51 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: Can this be my ZenCart home page?

Before you get in too deep with tpl_main_page customizing, be sure to check out all the admin switches. You can turn off the right column globally there.

I think you will want the conditional disable for the left column, not just the blanket $flag_disable_left = true; statement.

if ($this_is_home_page) {
  $flag_disable_left = true;
}

You can use define_main_page.php for your image map code, and /includes/templates/your_template/css/index_home.css for special home page styling (like disabling display of some elements there).

And there is at least one dropdown header menu mod in Downloads - check out what is available.

29 Sep 2007, 7:56 PM
#9
vood avatar

vood

New Zenner

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

Re: Can this be my ZenCart home page?

That's great! Thanks again. I'm on my way out of the frying pan!!!

Vood

29 Sep 2007, 9:36 PM
#10
vood avatar

vood

New Zenner

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

Re: Can this be my ZenCart home page?

I just about have everything set up the way I want, thanks to some really great people here.

I have copied my code from the imagemap on my other home page to the body of the define_main_page.php. For some reason, the image is not working. There is a place holder for the image, but no image.

I don't know how to link the image coordinates to the product category pages so that isn't done yet, but I figured that the image itself would at least appear. Can anyone please help with this?

Thanks,

Vood:huh:

30 Sep 2007, 12:24 AM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: Can this be my ZenCart home page?

What path do you specify for the image? You might still be calling for the image relative to the old location.

If you put it in /includes/templates/your_template/images/ and call it from there, you should be ok.

Oh, and thanks, I just noticed your addition to the post above. Yes, we make everything we sell. We've never encountered anyone asking for Bahai symbols, but you never know...

30 Sep 2007, 1:05 AM
#12
vood avatar

vood

New Zenner

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

Re: Can this be my ZenCart home page?

Yes, that is where I put it. I'm using Dreamweaver as my editor so it allows me to "browse" to the image whenever I enter the "src" tag. I don't know what the problem is. I've also been unable to find out how to link to my product category pages from the imagemap. Can you please point me to some help? Thanks in advance!

Vood

30 Sep 2007, 1:17 AM
#13
vood avatar

vood

New Zenner

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

Re: Can this be my ZenCart home page?

Here is the code for placing the image....

<img name="productimagemap"src="../../../../templates/wallet/images/productimagemap.gif" width="650" height="365" border="0" id="productimagemap" usemap="#m_productimagemap" alt="Handmade Luxury" />

Then it continues with.....

<map name="m_productimagemap" id="m_productimagemap"> <area shape="poly" coords="419,195,385,184,391,42,430,44,489,50,542,54,526,194,509,195,504,210,473,200,419,195" href="/products/nuggets.htm" title="Bees Wax Solid Lotion Nuggets" alt="Bees Wax Solid Lotion Nuggets" /> and so on for the image overlay coordinates.
30 Sep 2007, 1:23 AM
#14
gjh42 avatar

gjh42

Black Belt

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

Re: Can this be my ZenCart home page?

That
src="../../../../templates/wallet/images/productimagemap.gif"
looks like it may be referencing a location relative to the Dreamweaver installation, not necessarily the Zen Cart installation root. I'm not too familiar with HTML src syntax.

30 Sep 2007, 2:17 AM
#15
vood avatar

vood

New Zenner

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

Re: Can this be my ZenCart home page?

I fixed it by using an absolute address. I will just have to change it before I upload to the online server. I need to know how to link to my category pages using php tags in the body of my define_main_page.php file. If I could just have one example, I could probably run with it. Thanks.

Vood

30 Sep 2007, 2:23 AM
#16
gjh42 avatar

gjh42

Black Belt

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

Re: Can this be my ZenCart home page?

From my define_main_page.php:```php

<?php $fr_root = HTTP_SERVER . DIR_WS_CATALOG; $fr_cpath = $fr_root . 'index.php?main_page=index&cPath='; ?> <!--bof-home page header logo & links display--> <div id="homeShopView"><?php echo '<a href="' . $fr_root . 'index.php?main_page=page&id=2"><img src="' . $fr_root . DIR_WS_TEMPLATE . 'images/frshopview.gif" alt="Our Shop"></img></a>';?></div> <div id="homeLogo"><?php echo '<img src="' . $fr_root . 'images/frlogohomepg.gif" alt="Future Relics - Timeless Creations in Precious Metals"></img>';?><br /> We invite you to explore our catalog, ...</div> <div id="homeBoothView"><?php echo '<a href="' . $fr_root . 'index.php?main_page=page&id=3"><img src="' . $fr_root . DIR_WS_TEMPLATE . 'images/frboothview.gif" alt="Our Shop"></img></a>';?></div> <!--eof-home page header logo & links display--> <?php echo '<a href="' . $fr_cpath . '"></a>'?> <div id="headWed"><h1><?php echo '<a href="' . $fr_cpath . '1"><img src="' . $fr_root . DIR_WS_TEMPLATE . 'images/frhomeheadwed.gif" alt="the Wedding and Betrothal Collection"></img></a>';?></h1><br /> <?php echo '<a href="' . $fr_cpath . '1">Wedding Rings, Engagement Rings and Sets,</a>'?> <?php echo '<a href="' . $fr_cpath . '1_93">Bridal Crowns...</a>'?></div> ```I have created shortcuts for some of the long directory code; you can do a similar thing, or just substitute the original values for $fr_root and $fr_cpath in the link code.
30 Sep 2007, 4:25 AM
#17
vood avatar

vood

New Zenner

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

Re: Can this be my ZenCart home page?

Ok I understand how you set $fr_root, but how do you know to set the $fr_cpath to "index.php?main_page=index&cPath=" and what does this little peice of code say anyway?
Thanks,

Vood

30 Sep 2007, 4:56 AM
#18
gjh42 avatar

gjh42

Black Belt

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

Re: Can this be my ZenCart home page?

"index.php?main_page=index&cPath="
This is actually copied from the address bar while on a category page. This part of the url is always the same for a category page. It basically says it is an index (category list) page and to display the category path = (whatever).

You will see ampersands & displayed in various navigation code; when writing them into code, you should always replace them with the special character code so they don't get prematurely interpreted and cause an error: in this case &