можно и через модуль Мои изменения сделать
-
app/addons/my_changes/schemas/block_manager/blocks.post.php
<?php$schema[‘our_brands’][‘content’][‘brands’][‘function’] = array(‘fn_get_all_brands_modified’);
return $schema;
-
app/addons/my_changes/func.php
<?php use Tygh\Enum\ProductFeatures; if (!defined('BOOTSTRAP')) { die('Access denied'); } function fn_get_all_brands_modified() { $params = array( 'exclude_group' => true, 'get_descriptions' => true, 'feature_types' => array(ProductFeatures::EXTENDED), 'variants' => true, 'plain' => true, ); list($features) = fn_get_product_features($params, 0); $variants = array(); foreach ($features as $feature) { if (!empty($feature['variants'])) { $variants = array_merge($variants, $feature['variants']); } } if (AREA == 'C' && !empty($variants)) { foreach ($variants as $k => $v) { if (empty($v['image_pair'])) { unset($variants[$k]); } } } return $variants; }