Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation
What setting need to be changed in tpl_mega_menu.php for brands to be displayed in the shop by brand drop down menu?
I have read the readme.html file several times but I cannot find instructions to change the tpl_mega_menu. php. Could you please tell me what installation step that would be helpful in resolving my problem.
Thank you,
Jeff:
Anne:
What do I need to change in the following code?
<!--bof shop by brand -->
<div class="dropdown_1column">
<div class="col_1 firstcolumn">
<ul >
<?
$show_manufacturers= true;
// for large lists of manufacturers uncomment this section
/*
if (($_GET['main_page']==FILENAME_DEFAULT and ($_GET['cPath'] == '' or $_GET['cPath'] == 0)) or ($request_type == 'SSL')) {
$show_manufacturers= false;
} else {
$show_manufacturers= true;
}
*/
// Set to true to display manufacturers images in place of names
define('DISPLAY_MANUFACTURERS_IMAGES',false);
if ($show_manufacturers) {
// only check products if requested - this may slow down the processing of the manufacturers sidebox
if (PRODUCTS_MANUFACTURERS_STATUS == '1') {
$manufacturer_sidebox_query = "select distinct m.manufacturers_id, m.manufacturers_name, m.manufacturers_image
from " . TABLE_MANUFACTURERS . " m
left join " . TABLE_PRODUCTS . " p on m.manufacturers_id = p.manufacturers_id
where m.manufacturers_id = p.manufacturers_id and p.products_status= 1
order by manufacturers_name";
} else {
$manufacturer_sidebox_query = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image
from " . TABLE_MANUFACTURERS . " m
order by manufacturers_name";
}
$manufacturer_sidebox = $db->Execute($manufacturer_sidebox_query);
if ($manufacturer_sidebox->RecordCount()>0) {
$number_of_rows = $manufacturer_sidebox->RecordCount()+1;
// Display a list
$manufacturer_sidebox_array = array();
// kuroi: commented out to avoid starting list with text scrolling list entries such as "reset" and "please select"
// if (!isset($_GET['manufacturers_id']) || $_GET['manufacturers_id'] == '' ) {
// $manufacturer_sidebox_array[] = array('id' => '', 'text' => PULL_DOWN_ALL);
// } else {
// $manufacturer_sidebox_array[] = array('id' => '', 'text' => PULL_DOWN_MANUFACTURERS);
// }
while (!$manufacturer_sidebox->EOF) {
$manufacturer_sidebox_name = ((strlen($manufacturer_sidebox->fields['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturer_sidebox->fields['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturer_sidebox->fields['manufacturers_name']);
$manufacturer_sidebox_image = $manufacturer_sidebox->fields['manufacturers_image'];
$manufacturer_sidebox_array[] =
array('id' => $manufacturer_sidebox->fields['manufacturers_id'],
'text' => DISPLAY_MANUFACTURERS_IMAGES ?
zen_image(DIR_WS_IMAGES . $manufacturer_sidebox_image, $manufacturer_sidebox_name) :
$manufacturer_sidebox_name);
$manufacturer_sidebox->MoveNext();
}
}
} // $show_manufacturers
for ($i=0;$i<sizeof($manufacturer_sidebox_array);$i++) {
$content = '';
$content .= '<li ><a class="hide" href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_sidebox_array[$i]['id']) . '">';
$content .= $manufacturer_sidebox_array[$i]['text'];
$content .= '</a></li>' . "\n";
echo $content;
}
?>
</ul>
</div>
</div>
</li><!-- eof shop by brand -->
Thanks,
Jeff
Excellent template and, as always with your work, the documentation is superb. There's one change I'd like to make and, so far, my efforts have resulted in me just screwing it up. I'd like a login link at the upper right like you have in your Bristol Lace template. Any help would be greatly appreciated!
In the includes/templates/cambridge_pro/common/tpl_header.php file, replace this:
with this:Code:<!--bof-navigation display--> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <?php if ($_SESSION['customer_id']) { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a> | </li> <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | </li> <?php } else { if (STORE_STATUS == '0') { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li> <?php } } ?> </ul> </div> <div id="navMain1"> <ul> <li><img src="includes/templates/cambridge_pro/images/cart.png" class="cart-image" alt="the shopping cart" /><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><span class="red"><?php echo $_SESSION['cart']->count_contents();?></span> item(s) - <span class="red"><?php echo $currencies->format($_SESSION['cart']->show_total());?></span></a> | </li> <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li> <?php if ($_SESSION['cart']->count_contents() != 0) { ?> <?php }?> </ul> </div> <br class="clearBoth" /> </div> <!--eof-navigation display-->
And in the stylesheet.css file remove the display:none; that is on the navMain ul. You may have to do some css adjustments, moving the styles from the #navMain1 group to the #navMain group.Code:<!--bof-navigation display--> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a> | </li> <?php if ($_SESSION['customer_id']) { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a> | </li> <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | </li> <?php } else { if (STORE_STATUS == '0') { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a> | </li> <?php } } ?> <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><img src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'images').'/'.HEADER_ICON_CART ?>" alt="cart icon" class="cart-icon" /><?php echo $_SESSION['cart']->count_contents();?> item(s) - <?php echo $currencies->format($_SESSION['cart']->show_total());?></a> | </li> <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li> <?php if ($_SESSION['cart']->count_contents() != 0) { ?> <?php }?> </ul> </div> <br class="clearBoth" /> </div> <!--eof-navigation display-->
Thanks,
Anne
Bookmarks