Zen Cart Templates - How to Replace the Logo in Zen Cart template
How to Replace the Logo in Zen Cart template.
The images of the template are located in the /images directory of your template.
The path to the logo image from the root directory (where the store is installed) is the following:
/includes/templates/DDDD/images/logo.gif (where /DDDD/ is the name of the installed template). You can replace the default logo.gif file with your custom logo that has the same name. This easy way lets you substitute the logo image file with your own .gif file.
This method is for the advanced users that know the PHP basics and want to make more advanced changes, like change the filename of the logotype or the code that draws the image. The code can be located it in the tpl_header.php file that is located in /common directory of the template (/includes/templates/DDDD/common/).
Below is the sample code:
<!--bof-header logo and navigation display-->
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' .
zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) .
where HEADER_LOGO_IMAGE is the constant of the logotype image. Replace it with the name of your image (in two places in the code), for example
"my_logo.jpg" (with doublequets);
$template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' - the path to the image directory, like
zen_image() - function of code insertion like <img src="path/to/image.ext" alt="image" width="100" height="100" />