Hi everyone!
I've got kind of a tricky situation here and I'm at the point where I need some help.
Server and Zen Specs:
Zen 1.3.8a full fileset
Hostgator Linux Server (CentOS I think, not sure though)
PHP 5 and Mysql 5
Template overrides system in effect, no original files are being changed
Now here's my situation. I'm supposed to convert a custom designed OSCommerce Template as seen here: http://www.hhhenterprises.com
I've got almost everything figured out but the header is killing me. You'll notice they have a quick buy option, custom nav, search, newsletter, and of course it's all laid out in tables.
So I need to get that complete header in working order ported over to the test server at http://www.ithinkcreative.us/hhhtest
and it's not working out well. I've tried to add the tables directly into tpl_header.php (overrides of course) within the divs and I've also tried removing the divs as well. I've also tried just using the original header.php from the OSC and changing the values in tpl_main_page.php to point to it.
The OSC header code has php calls going to file defines that don't exist in the zencart filenames.php, so I'll be creating the files in includes/extra_datafiles. That should take care of the things like quick buy and newsletter. We're all good there.
So here's my questions:
1. I can't get tpl_header.php (or header.php) to display any of the tables properly. I understand that there would be some php parsing issues with files that don't exist, but as they are includes php should skip them anyway. the graphics at least should appear where they're suppose to go. What am I doing wrong here?
2.How much of the php from the OSC Header will need to change...i.e. things like "if (basename($PHP_SELF) != 'scrapbook.php'" Is this valid code for Zen?
3. just out of curiosity, why do none of the defined files in zen's filenames.php have an extension to them? i.e. define('FILENAME_SITE_MAP', 'site_map');
What would happen if one did add extensions to them?
If you look at http://www.ithinkcreative.us/hhhtest you'll see what the site looks like right now, below is the code that is being used to get the lovely site you see there. Obviously, reverting to the original tpl_header.php gives me the full site which is pretty much complete at this point.
tpl_header.php (no php here except for message stack)
-----------------------------------------------------------------------------------------
<?php
/**
* Common Template - tpl_header.php
*
* this file can be copied to /templates/your_template_dir/pagename<br />
* example: to override the privacy page<br />
* make a directory /templates/my_template/privacy<br />
* copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
* to override the global settings and turn off the footer un-comment the following line:<br />
* <br />
* $flag_disable_header = true;<br />
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
*/
?>
<?php
// Display all header alerts via messageStack:
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
echo htmlspecialchars(urldecode($_GET['error_message']));
}
if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
echo htmlspecialchars($_GET['info_message']);
} else {
}
?>
<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<!--bof-navigation display-->
<table width="820" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="820" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="396"><img src="../images/topmenu_left.gif" height="21" ALT=""></td>
<td width="424">
<table width="424" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="52"><img src="../images/topmenu_mycart.gif" width="52" height="21" ALT="My Shopping Cart"></td>
<td background="images/topmenu_cartcontents.gif" width="85" style="font-family: Verdana, Arial, sans-serif; font-size: 10pt;" align="center" valign="top"></td>
<td width="62"><a href=""><img src="../images/topmenu_viewcart.gif" width="62" height="21" border="0" ALT="View Shopping Cart"></a></td>
<td width="62"><a href=""><img src="../images/topmenu_checkout.gif" width="62" height="21" border="0" ALT="Check Out"></a></td>
<td width="49"><a href=""><img src="../images/topmenu_login.gif" width="49" height="21" border="0" ALT="Login to My Account"></a></td>
<td><a href=""><img src="../images/topmenu_myaccount.gif" width="92" height="21" border="0" ALT="My Customer Account"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="../images/main_banner.gif" ALT="Beading and Jewelry Making Supplies at HHH Enterprises"></td>
</tr>
<tr>
<td><a href=""><img src="../images/mainmenu_home.gif" height="20" border="0" ALT="Home"></a><a href=""><img src="../images/mainmenu_aboutus.gif" height="20" border="0" ALT="About Us"></a><a href=""><img src="../images/mainmenu_contactus.gif" height="20" border="0" ALT="Contact Us"></a><a href=""><img src="../images/mainmenu_design.gif" height="20" border="0" ALT="Design Gallery"></a><a href=""><img src="../images/mainmenu_angel.gif" height="20" border="0" ALT="Beading Articles"></a><a href="blog_index.php"><img src="../images/mainmenu_blog.gif" height="20" border="0" ALT="Our Beading Blog"></a><a href=""><img src="../images/mainmenu_shopping.gif" height="20" border="0"></a><a href=""><img src="../images/mainmenu_whatsnew.gif" height="20" border="0"></a><a href=""><img src="../images/mainmenu_clearance.gif" height="20" border="0" ALT="Clearance Sale"></a><img src="../images/mainmenu_right.gif" height="20" ALT=""></td>
</tr>
<tr>
<td background="images/thirdmenu_bg.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../images/thirdmenu_left.gif" ALT=""></td>
<td><img src="../images/thirdmenu_search.gif" ALT="Search Our Site"></td>
<td background="images/thirdmenu_search_bg.gif" width="126" align="center" valign="top" style="padding-top: 10px;">
<input type="text" name="keywords" size="15" VALUE="keyword or item #" onFocus="document.quick_find.keywords.value=''">
</td>
<td><input type="image" src="../images/thirdmenu_search_button.gif" border="0" ALT="Search"></td>
</form>
<td><img src="../images/thirdmenu_quick.gif" ALT="Catalog Order Form"></td>
<td background="images/thirdmenu_quick_bg.gif" width="109" align="center" valign="top" style="padding-top: 10px;">
<INPUT TYPE="text" NAME="directbuy_qty[1]" VALUE="1" size="2">
</td>
<td><input type="image" src="../images/thirdmenu_quick_button.gif" border="0" ALT="Buy"></td>
</form>
<td><!-- BEGIN LivePerson Button Code -->
<a href="newsletter.html" target="_blank"><img src="../images/news_signup.gif" name="hcIcon" width=160 height=73 border=0></a></a><!-- END LivePerson Button code --></td>
<td><a href=""><img src="../images/thirdmenu_getcatalog.gif" border="0" ALT="Get a Catalog"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="175" valign="top"><table border="0" cellspacing="0" cellpadding="0"></table></td>
-------------------------------------------------------------------------------------------------------------------------------------
I hope all of this makes sense to someone, and I really appreciate any help offered.
Michael Smith



