ZC 138 - newest. Bug Demo is new out of box and default demo database. No mods.
Forgive if this has been posted, but I search many ways and not find any info.
Anyway...
When the Best sellers side box is displayed, the links are missing the cPath Param. This seems no big deal, but if you also display the category icon on the page, clicking on it takes you to the homepage instead of the category. You can see this clearly here:
http://www.bellaknobs.com/test/
and clicking on any of the Best Seller Links. The correct item will be displayed, but then click on the category icon will fail to display the category.
Since I can't find any mention of this anywhere, I make small patch that makes this work right.
Here is code that replace tpl_best_sellers.php
<?php
/**
* Side Box Template
*
* @package templateSystem
* @copyright Copyright 2003-2005 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_best_sellers.php 2982 2006-02-07 07:56:41Z birdbrain $
*/
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
$content .= '<div class="wrapper">' . "\n" . '<ol>' . "\n";
for ($i=1; $i<=sizeof($bestsellers_list); $i++) {
// kiddo mod
$cpath = zen_get_product_path($bestsellers_list[$i]['id']);
$content .= '<li><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . "&cPath=" . $cpath . '">' . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a></li>' . "\n";
}
$content .= '</ol>' . "\n";
$content .= '</div>' . "\n";
$content .= '</div>';
?>
Then this now makes the category icon link work properly since you pass the proper cPath arg.
If this is already known or there is a better way to fix, sorry to waste your time.
PS: I think I see this same problem with the Quick Reorder Box too.
PPS: I can only leave the bug example install up a few days so if it's gone soon, sic transit gloria mundi.
Bookmarks