Код:
if(count($rootIDs)){ $q = db_phquery( "SELECT parent,categoryID, ".LanguagesManager::sql_prepareField('name'). " AS name, products_count, slug FROM ?#CATEGORIES_TABLE WHERE categoryID<>0 and parent IN (?@) ORDER BY sort_order, name", $rootIDs); //($subcategories_numberlimit>0?' _LIMIT '.intval($subcategories_numberlimit+1
''), while ($row = db_fetch_assoc($q)){ if(!isset($result[$row['parent']]))$result[$row['parent']] = array(); $result[$row['parent']][] = $row; } }
[/spoil]
добавьте
, picture после
slug, чтобы стало так:
[spoil]
Код:
if(count($rootIDs)){ $q = db_phquery( "SELECT parent,categoryID, ".LanguagesManager::sql_prepareField('name'). " AS name, products_count, slug, picture FROM ?#CATEGORIES_TABLE WHERE categoryID<>0 and parent IN (?@) ORDER BY sort_order, name", $rootIDs); //($subcategories_numberlimit>0?' _LIMIT '.intval($subcategories_numberlimit+1
''), while ($row = db_fetch_assoc($q)){ if(!isset($result[$row['parent']]))$result[$row['parent']] = array(); $result[$row['parent']][] = $row; } }
[/spoil]
2. В файле /published/SC/html/scripts/templates/frontend/root_categories.html замените
[spoil]
Код:
<a href='{"?categoryID=`$_subcat.categoryID`&category_slug=`$_subcat.slug`"|set_query_html}'>{$_subcat.name|escape:'html'}</a>
[/spoil]
на
[spoil]
Код:
<a href='{"?categoryID=`$_subcat.categoryID`&category_slug=`$_subcat.slug`"|set_query_html}'>{if $_subcat.picture ne ''}<img src="{$smarty.const.URL_PRODUCTS_PICTURES}/{$_subcat.picture|escape:'url'}">{/if}{$_subcat.name|escape:'html'}</a>