Переделал данный блок маленько,
{php}
function BestViewCenterRecursiveCat($catID,$arrayID=array()) {
$data = db_query("SELECT categoryID FROM ".CATEGORIES_TABLE." WHERE parent=".$catID);
while ($row = db_fetch_assoc($data)) $arrayID = BestViewCenterRecursiveCat($row['categoryID'],$arrayID);
$arrayID[]=$catID;
return $arrayID; }
$categoryID = $this->get_template_vars('categoryID');
$addon = isset($categoryID)?"AND p.categoryID IN (".implode(",",BestViewCenterRecursiveCat($categoryID)).")":"";
$data = db_query("
SELECT p.name, p.productID, p.Price, p.in_stock, p.viewed_times, p.brief_description, pp.filename AS picture
FROM ".PRODUCTS_TABLE." AS p
LEFT JOIN ".PRODUCT_PICTURES." AS pp ON p.default_picture=pp.photoID
WHERE p.enabled=1 AND p.categoryID>1 $addon
ORDER BY p.viewed_times DESC
LIMIT 4");
while ($row = db_fetch_assoc($data)) {
$row["PriceWithUnit"] = show_price($row["Price"]);
$r[] = $row;}
$this->assign("best_view_to_show", $r);
{/php}
<table cellspacing="0" cellpadding="0" width="100%">
{section name=u loop=$best_view_to_show}
{if $smarty.section.u.index is div by $smarty.const.CONF_COLUMNS_PER_PAGE}<tr>{assign var="helpcounter" value=0}{/if}
{assign var="helpcounter" value=$helpcounter+1}
<td width="{math equation="100 / x" x=4 format="%d"}%" align="left" valign="top" style="padding: 8px;
border: 1px solid #000; -webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px; background: #fff;">
{include file="product_brief2.tpl.html" product_info=$best_view_to_show[u]}
</td>
{if ($smarty.section.u.index+1) is div by $smarty.const.CONF_COLUMNS_PER_PAGE || $smarty.section.u.last}
</tr>
<tr>
{section name=e loop=$smarty.const.CONF_COLUMNS_PER_PAGE max=$helpcounter}
{assign var="idnrecat" value=$smarty.section.u.index-$helpcounter+$smarty.section.e.index+1}
<td align="left">
</td>
{if $smarty.section.e.index+1 ne $smarty.const.CONF_COLUMNS_PER_PAGE}<td><img src="data/{$smarty.const.TPL}/pixel.gif" class="delim" alt=""></td>{/if}
{/section}
</tr>
{else}
<td class="delim"><img src="data/{$smarty.const.TPL}/pixel.gif" class="delim" alt=""></td>
{/if}
{sectionelse}
<div align="center">В этой категории нет ни одного товара</div>
{/section}
</table>
Отображение получилось как у блока популярные или новые товары, без кнопок подробнее и в корзину, убрал количество просмотров товара.
Обратите внимание на строку 28
{include file="product_brief2.tpl.html" product_info=$best_view_to_show[u]}
Создал новый файл короткого описания товара вот код:
{* шаблон короткого описния товара *}
{if $product_info ne NULL}
<table cellspacing="0" cellpadding="0" width="100%" >
<tr>
<td class="block_bg">
<table cellspacing="0" cellpadding="0" width="100%" >
<tr>
<td class="hdbtop" valign="top" align="left">
<table cellspacing="0" cellpadding="0" width="100%">
<tr> {if $smarty.const.CONF_DISPLAY_FOTO eq 1}
{if $product_info.picture}
{else}
{if $smarty.const.CONF_DISPLAY_NOPHOTO eq 1}
<td class="imboxl"><a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}product_{$product_info.productID}.html{else}index.php?productID={$product_info.productID}{/if}"><img src="data/empty.gif" alt="no photo"></a></td>
{/if}
{/if}
{/if}
{* фотография товара *}
<tr>
{if $smarty.const.CONF_DISPLAY_FOTO eq 0}
{if $product_info.picture}
<td class="imboxr"><a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}product_{$product_info.productID}.html{else}index.php?productID={$product_info.productID}{/if}"><img src="data/small/{$product_info.picture}" alt="{$product_info.name}"></a></td>
{else}
{if $smarty.const.CONF_DISPLAY_NOPHOTO eq 1}
<td class="imboxr"><a href="{if $smarty.const.CONF_MOD_REWRITE eq 1}product_{$product_info.productID}.html{else}index.php?productID={$product_info.productID}{/if}"><img src="data/empty.gif" alt="no photo"></a></td>
{/if}
{/if}
{/if}
</tr>
{* короткое описание товара *}
</tr>
<tr class="hdbtop" align="center" valign="middle">
<td class="price" id="optionPrice_{$product_info.productID}">{if $currencies_count ne 0}{if $product_info.Price <= 0}{$smarty.const.STRING_NOPRODUCT_IN}{else}{$product_info.PriceWithUnit}{/if}{/if}</td>
{if $currencies_count ne 0}{if $product_info.list_price > 0 && $product_info.list_price > $product_info.Price && $product_info.Price > 0}
{/if}{/if}
</tr>
<tr>
<td>
{if $smarty.const.CONF_MOD_REWRITE eq 1}
{assign var="tlink" value="<a href='product_`$product_info.productID`.html'>`$product_info.name`</a>"}
{else}
{assign var="tlink" value="<a href='index.php?productID=`$product_info.productID`'>`$product_info.name`</a>"}
{/if}
{assign var="preheader" value="<a href='`$smarty.const.ADMIN_FILE`?productID=`$product_info.productID`&eaction=prod' title='`$smarty.const.STRING_EDITPR`' style='float: right;'>+</a>"}
{if $isadmin eq "yes"}{assign var="postheader" value=`$preheader``$tlink`}{else}{assign var="postheader" value=$tlink}{/if}
{include file="header.tpl.html" header=$postheader}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
{/if}
Смотреть что получилось можно здесь
http://kupinstrument.ruИзвините забыл сказать, блок называется последние купленные товары!!!