Исходный движок местами очень непродуман и неудобен для пользователей. В частности, чтобы увидеть есть ли фото у товара нужно заходить в карточку и пролистывать вниз страницы. Согласитесь трудозатратно даже при небольшом количестве товаров, а при каталоге в несколько тысяч товаров вообще нереальный геморрой.
Решение:
1) в файле /published/SC/html/scripts/templates/backend/categories_products.html
Хотела еще добавить сортировку по наличию и отсутствию фото, но не осилила
Так не работает
Решение:
1) в файле /published/SC/html/scripts/templates/backend/categories_products.html
вначале файла добавляем
<link rel="stylesheet" href="{$smarty.const.URL_ROOT}/3rdparty/highslide/highslide.css" type="text/css" /> <script type="text/javascript" src="{$smarty.const.URL_ROOT}/3rdparty/highslide/highslide.js"></script> <script type="text/javascript"> hs.graphicsDir = '{$smarty.const.URL_ROOT}/3rdparty/highslide/graphics/'; hs.registerOverlay( {ldelim} thumbnailId: null, overlayId: 'controlbar', position: 'top right', hideOnMouseOut: true {rdelim} ); hs.outlineType = 'rounded-white'; </script>
после
<td><a href="{$product_url}">{$GridRows[i].product_code|escape:'html'} </a></td>
добавляем код
<td>{if $GridRows[i].thumbnail}<a target="_blank" onclick="return hs.expand(this)" href='{$smarty.const.URL_PRODUCTS_PICTURES}/{if $GridRows[i].big_picture}{$GridRows[i].big_picture|escape:'url'}{else}{$GridRows[i].picture|escape:'url'}{/if}'><img src="{$smarty.const.URL_PRODUCTS_PICTURES}/{$GridRows[i].thumbnail|escape:'url'}" /></a>{/if}</td>
2) в /published/SC/html/scripts/modules/test/_methods/b_categories_products.php
добавляем ПОСЛЕ
$gridEntry->registerHeader("prdset_product_code", 'product_code', false, 'asc');
строку
$gridEntry->registerHeader("prdset_product_picture");
Так не работает
$gridEntry->registerHeader("prdset_product_picture", 'product_picture', false, 'asc');