Не работает вывод минимальной и максимальной цены в дочерних категориях

#
Не работает вывод минимальной и максимальной цены в дочерних категориях
Добрый день, для контроллера Shop_Controller_Show добавил метод addMinMaxPrice() и в корневых категориях работает все, но если зайти в дочерние категории то данная функция не работает. Вот пример рабочей страницы (можно отследить по тому как работает фильтр) https://dd76.ru/katalog-produktsii/34/ и страницы где не работает https://dd76.ru/katalog-produktsii/34/dvigatel-yamz-v-obraznye/.
Вот код ТДС

<?php

$Shop_Controller_Show = Core_Page::instance()->object;

$xslName = $Shop_Controller_Show->item
   ? Core_Array::get(Core_Page::instance()->libParams, 'shopItemXsl')
   : Core_Array::get(Core_Page::instance()->libParams, 'shopXsl');

$Shop_Controller_Show->addEntity(
   Core::factory('Core_Xml_Entity')
      ->name('ТекущаяГруппа')->value($Shop_Controller_Show->group)
)->addEntity(
   Core::factory('Core_Xml_Entity')
      ->name('show_comments')->value(Core_Array::get(Core_Page::instance()->libParams, 'showComments', 1))
)->addEntity(
   Core::factory('Core_Xml_Entity')
      ->name('show_add_comments')->value(Core_Array::get(Core_Page::instance()->libParams, 'showAddComment', 2))
);

$Shop_Controller_Show
   ->tags(TRUE)
   ->comments(TRUE)
   ->associatedItems(TRUE)
   ->modifications(TRUE);

if ($Shop_Controller_Show->item == 0)
{
   $Shop_Controller_Show->itemsForbiddenTags(array('text'));


   //Producers
   if (Core_Array::getGet('producer_id'))
   {
      $iProducerId = intval(Core_Array::getGet('producer_id'));
      $Shop_Controller_Show->addEntity(
         Core::factory('Core_Xml_Entity')
            ->name('producer_id')->value($iProducerId)
      );

      $Shop_Controller_Show->shopItems()
         ->queryBuilder()
         ->select('shop_items.*')
         ->where('shop_items.shop_producer_id', '=', $iProducerId);

      $Shop_Controller_Show->addCacheSignature('producer_id=' . $iProducerId);
   }

   if (Core_Array::getGet('filter') || Core_Array::getGet('sorting'))
   {
      $Shop_Controller_Show->addEntity(
         Core::factory('Core_Xml_Entity')
            ->name('filter')->value(1)
      );

      $oShop = $Shop_Controller_Show->getEntity();

      $sorting = intval(Core_Array::getGet('sorting'));
      $Shop_Controller_Show->addEntity(
         Core::factory('Core_Xml_Entity')
            ->name('sorting')->value($sorting)
      );
      $Shop_Controller_Show->addCacheSignature('sorting=' . $sorting);

      // Prices
      $price_from = intval(Core_Array::getGet('price_from'));
      $price_to = intval(Core_Array::getGet('price_to'));
      if ($price_from || $price_to || $sorting == 1 || $sorting == 2)
      {
         // Получаем список валют магазина
         $aShop_Currencies = Core_Entity::factory('Shop_Currency')->findAll();

         $query_currency_switch = 'price';
         foreach ($aShop_Currencies as $oShop_Currency)
         {
            // Получаем коэффициент пересчета для каждой валюты
            $currency_coefficient = Shop_Controller::instance()->getCurrencyCoefficientInShopCurrency(
               $oShop_Currency, $oShop->Shop_Currency
            );

            $query_currency_switch = "IF (`shop_items`.`shop_currency_id` = '{$oShop_Currency->id}', IF (shop_discounts.value, IF(shop_discounts.type, price * {$currency_coefficient} - shop_discounts.value, price * (100 - shop_discounts.value) * {$currency_coefficient} / 100), shop_items.price * {$currency_coefficient}), {$query_currency_switch})";
         }

         $current_date = date('Y-m-d H:i:s');
         $Shop_Controller_Show->shopItems()
            ->queryBuilder()
            ->select(array(Core_QueryBuilder::expression($query_currency_switch), 'absolute_price'))
            ->leftJoin('shop_item_discounts', 'shop_items.id', '=', 'shop_item_discounts.shop_item_id')
            ->leftJoin('shop_discounts', 'shop_item_discounts.shop_discount_id', '=', 'shop_discounts.id', array(
               array('AND (' => array('shop_discounts.end_datetime', '>=', $current_date)),
               array('OR' => array('shop_discounts.end_datetime', '=', '0000-00-00 00:00:00')),
               array('AND' => array('shop_discounts.start_datetime', '<=', $current_date)),
               array(')' => NULL)
            ));

         if ($price_from)
         {
            $Shop_Controller_Show->shopItems()->queryBuilder()->having('absolute_price', '>=', $price_from);
            $Shop_Controller_Show->addEntity(
               Core::factory('Core_Xml_Entity')
                  ->name('price_from')->value($price_from)
            );
            $Shop_Controller_Show->addCacheSignature('price_from=' . $price_from);
         }
         if ($price_to)
         {
            $Shop_Controller_Show->shopItems()->queryBuilder()->having('absolute_price', '<=', $price_to);
            $Shop_Controller_Show->addEntity(
               Core::factory('Core_Xml_Entity')
                  ->name('price_to')->value($price_to)
            );
            $Shop_Controller_Show->addCacheSignature('price_to=' . $price_to);
         }

         $Shop_Controller_Show->shopItems()->queryBuilder()
            ->clearOrderBy()
            ->orderBy('absolute_price', $sorting == 1 ? 'ASC' : 'DESC');
      }
      
      $sorting == 1 && $Shop_Controller_Show->shopItems()->queryBuilder()
         ->clearOrderBy()
         ->orderBy('shop_items.price', 'ASC');
      $sorting == 2 && $Shop_Controller_Show->shopItems()->queryBuilder()
         ->clearOrderBy()
         ->orderBy('shop_items.price', 'DESC');
      $sorting == 3 && $Shop_Controller_Show->shopItems()->queryBuilder()
         ->clearOrderBy()
         ->orderBy('shop_items.showed', 'DESC');

      // Additional properties
      $oShop_Item_Property_List = Core_Entity::factory('Shop_Item_Property_List', $oShop->id);

      $aProperties = $Shop_Controller_Show->group !== FALSE && is_null($Shop_Controller_Show->tag)
         ? $oShop_Item_Property_List->getPropertiesForGroup($Shop_Controller_Show->group)
         : $oShop_Item_Property_List->Properties->findAll();

      $aTmpProperties = array();
      $havingCount = 0;
      foreach ($aProperties as $oProperty)
      {
         // Св-во может иметь несколько значений
         $aPropertiesValue = Core_Array::getGet('property_' . $oProperty->id);
         if ($aPropertiesValue)
         {
            !is_array($aPropertiesValue) && $aPropertiesValue = array($aPropertiesValue);
            foreach ($aPropertiesValue as $sPropertyValue)
            {
               $aTmpProperties[] = array($oProperty, strval($sPropertyValue));
            }
            $havingCount++;
         }
         elseif (!is_null(Core_Array::getGet('property_' . $oProperty->id . '_from')))
         {
            $tmpFrom = Core_Array::getGet('property_' . $oProperty->id . '_from');
            $tmpTo = Core_Array::getGet('property_' . $oProperty->id . '_to');

            !is_array($tmpFrom) && $tmpFrom = array($tmpFrom);
            !is_array($tmpTo) && $tmpTo = array($tmpTo);

            // From ... to ...
            foreach ($tmpFrom as $iKey => $sValue)
            {
               $to = Core_Array::get($tmpTo, $iKey);

               $aTmpProperties[] = array($oProperty, array(
                     'from' => $sValue != ''
                        ? ($oProperty->type == 11 ? floatval($sValue) : intval($sValue))
                        : '',
                     'to' => $to != ''
                        ? ($oProperty->type == 11 ? floatval($to) : intval($to))
                        : ''
                  ));
            }
            $havingCount++;
         }
      }

      if (count($aTmpProperties))
      {
         $aTableNames = array();

         $Shop_Controller_Show->shopItems()->queryBuilder()
            ->leftJoin('shop_item_properties', 'shop_items.shop_id', '=', 'shop_item_properties.shop_id')
            ->setAnd()
            ->open();

         reset($aTmpProperties);
         while(list(, list($oProperty, $propertyValue)) = each($aTmpProperties))
         {
            $tableName = $oProperty->createNewValue(0)->getTableName();

            !in_array($tableName, $aTableNames) && $aTableNames[] = $tableName;

            $Shop_Controller_Show->shopItems()->queryBuilder()
               ->where('shop_item_properties.property_id', '=', $oProperty->id);

            if (!is_array($propertyValue))
            {
               // Для строк фильтр LIKE %...%
               if ($oProperty->type == 1)
               {
                  $Shop_Controller_Show->shopItems()->queryBuilder()
                     ->where($tableName . '.value', 'LIKE', "%{$propertyValue}%");
               }
               else
               {
                  // Checkbox
                  $oProperty->type == 7 && $propertyValue != '' && $propertyValue = 1;

                  $Shop_Controller_Show->shopItems()->queryBuilder()
                     ->open()
                     ->where($tableName . '.value', '=', $propertyValue)
                     ->setOr()
                     ->where($tableName . '.value', 'IS', NULL)
                     ->close()
                     ;
               }

               $Shop_Controller_Show->shopItems()->queryBuilder()
                  ->setOr();

               $Shop_Controller_Show->addEntity(
                  Core::factory('Core_Xml_Entity')
                     ->name('property_' . $oProperty->id)->value($propertyValue)
               );
               $Shop_Controller_Show->addCacheSignature("property{$oProperty->id}={$propertyValue}");
            }
            else
            {
               $from = trim(Core_Array::get($propertyValue, 'from'));
               $from && $Shop_Controller_Show->shopItems()->queryBuilder()
                  ->open()
                  ->where($tableName . '.value', '>=', $from)
                  ->setOr()
                  ->where($tableName . '.value', 'IS', NULL)
                  ->close()
                  ->setAnd();

               $to = trim(Core_Array::get($propertyValue, 'to'));
               $to && $Shop_Controller_Show->shopItems()->queryBuilder()
                  ->open()
                  ->where($tableName . '.value', '<=', $to)
                  ->setOr()
                  ->where($tableName . '.value', 'IS', NULL)
                  ->close();

               $Shop_Controller_Show->shopItems()->queryBuilder()
                  ->setOr();

               $Shop_Controller_Show->addEntity(
                  Core::factory('Core_Xml_Entity')
                     ->name('property_' . $oProperty->id . '_from')->value($from)
               )->addEntity(
                  Core::factory('Core_Xml_Entity')
                     ->name('property_' . $oProperty->id . '_to')->value($to)
               );

               $Shop_Controller_Show
                  ->addCacheSignature("property{$oProperty->id}_from={$from}")
                  ->addCacheSignature("property{$oProperty->id}_to={$to}");
            }
         }

         $Shop_Controller_Show->shopItems()->queryBuilder()
            ->close()
            ->groupBy('shop_items.id')
            ->having(Core_Querybuilder::expression('COUNT(DISTINCT `shop_item_properties`.`property_id`)'), '=', $havingCount);

         foreach ($aTableNames as $tableName)
         {
            $Shop_Controller_Show->shopItems()->queryBuilder()
               ->leftJoin($tableName, 'shop_items.id', '=', $tableName . '.entity_id',
                  array(
                     array('AND' => array('shop_item_properties.property_id', '=', Core_QueryBuilder::expression($tableName . '.property_id')))
                  )
               );
         }
      }
   }
}
else
{
   if (Core_Array::getPost('add_comment') && Core_Array::get(Core_Page::instance()->libParams, 'showComments', 1))
   {
      $oShop = $Shop_Controller_Show->getEntity();

      $Shop_Controller_Show->cache(FALSE);

      $oLastComment = Core_Entity::factory('Comment')->getLastCommentByIp(
         Core_Array::get($_SERVER, 'REMOTE_ADDR')
      );

      $oXmlCommentTag = Core::factory('Core_Xml_Entity')
         ->name('document');

      $siteuser_id = 0;
      if (Core::moduleIsActive('siteuser'))
      {
         $oSiteuser = Core_Entity::factory('Siteuser')->getCurrent();

         if ($oSiteuser)
         {
            $siteuser_id = $oSiteuser->id;
         }
      }

      $oComment = Core_Entity::factory('Comment');

      $allowable_tags = '<b><strong><i><em><br><p><u><strike><ul><ol><li>';
      $oComment->parent_id = intval(Core_Array::getPost('parent_id', 0));
      $oComment->active = $oShop->comment_active;
      $oComment->author = Core_Str::stripTags(Core_Array::getPost('author'));
      $oComment->email = Core_Str::stripTags(Core_Array::getPost('email'));
      $oComment->phone = Core_Str::stripTags(Core_Array::getPost('phone'));
      $oComment->grade = intval(Core_Array::getPost('grade', 0));
      $oComment->subject = Core_Str::stripTags(Core_Array::getPost('subject'));
      $oComment->text = nl2br(Core_Str::stripTags(Core_Array::getPost('text'), $allowable_tags));
      $oComment->siteuser_id = $siteuser_id;

      $oShop_Item = Core_Entity::factory('Shop_Item', $Shop_Controller_Show->item);

      $oXmlCommentTag
         ->addEntity($oComment)
         ->addEntity($oShop_Item);

      if (is_null($oLastComment) || time() > Core_Date::sql2timestamp($oLastComment->datetime) + ADD_COMMENT_DELAY)
      {
         if ($oShop->use_captcha == 0 || $siteuser_id > 0 || Core_Captcha::valid(Core_Array::getPost('captcha_id'), Core_Array::getPost('captcha')))
         {
            $oComment->save();

            $oShop_Item->add($oComment);

            $oXmlCommentTag->addEntity($oShop);

            // Отправка письма администратору
            $sText = Xsl_Processor::instance()
               ->xml($oXmlCommentTag->getXml())
               ->xsl(Core_Entity::factory('Xsl')->getByName(Core_Array::get(Core_Page::instance()->libParams, 'addCommentAdminMailXsl')))
               ->process();

            Core_Mail::instance()
               ->to(EMAIL_TO)
               ->from(Core_Valid::email($oComment->email)
                  ? $oComment->email
                  : EMAIL_TO
               )
               ->subject(Core::_('Shop.comment_mail_subject'))
               ->message(trim($sText))
               ->contentType(Core_Array::get(Core_Page::instance()->libParams, 'commentMailNoticeType', 0) == 0
                  ? 'text/plain'
                  : 'text/html'
               )
               ->send();
         }
         else
         {
            $oXmlCommentTag->addEntity(Core::factory('Core_Xml_Entity')
               ->name('error_captcha')->value(1)
            );

            $oComment->text = Core_Str::br2nl($oComment->text);
            $Shop_Controller_Show->addEntity($oComment);
         }
      }
      else
      {
         $oXmlCommentTag->addEntity(Core::factory('Core_Xml_Entity')
            ->name('error_time')->value(1)
         );

         $oComment->text = Core_Str::br2nl($oComment->text);
         $Shop_Controller_Show->addEntity($oComment);
      }

      // Результат добавления комментария
      $xsl_result = Xsl_Processor::instance()
         ->xml($oXmlCommentTag->getXml())
         ->xsl(Core_Entity::factory('Xsl')->getByName(
            Core_Array::get(Core_Page::instance()->libParams, 'addCommentNoticeXsl'))
         )
         ->process();

      $Shop_Controller_Show->addEntity(
         Core::factory('Core_Xml_Entity')
            ->name('message')->value($xsl_result)
      );
   }
}

// В корне выводим из всех групп
if ($Shop_Controller_Show->group == 0)
{
   $Shop_Controller_Show->group(FALSE);
}

/* Производители */
$oShop = $Shop_Controller_Show->getEntity();

// XML-сущность, к которй будут добавляться производители
$oProducersXmlEntity = Core::factory('Core_Xml_Entity')->name('producers');

// Добавляем XML-сущность контроллеру показа
$Shop_Controller_Show->addEntity($oProducersXmlEntity);

// Список производителей
$oShop_Producers = $oShop->Shop_Producers;
$oShop_Producers->queryBuilder()
   ->select('shop_producers.*')
   ->distinct()
   ->join('shop_items', 'shop_items.shop_producer_id', '=', 'shop_producers.id')
   ->where('shop_items.shop_group_id', '=', $Shop_Controller_Show->group)
   ->where('shop_items.deleted', '=', 0);

$aShop_Producers = $oShop_Producers->findAll();
foreach ($aShop_Producers as $oShop_Producer)
{
   // Добавляем производителя потомком XML-сущности
   $oProducersXmlEntity->addEntity(
      $oShop_Producer->clearEntities()
   );
}


/**
* Вывод баннера на странице товара
*
* @author Malinovskii Aleksandr, KAD Systems (©) 2015
* @date 23-11-2015   
* Начало >>
*/
ob_start();

Kad::showInfosystem('ad_БаннерТовара', 24);

$oBannerItems = ob_get_clean();
$oBannerItems = Core::factory('Core_Xml_Entity')->name('oBannerItem')->value($oBannerItems);

$Shop_Controller_Show->addEntity($oBannerItems);
/**
* << Конец
* @author Malinovskii Aleksandr, KAD Systems (©) 2015
* @date 23-11-2015
*/


/**
* Вывод номера телефона из константы
*
* @author Malinovskii Aleksandr, KAD Systems (©) 2015
* @date 23-11-2015   
* Начало >>
*/
$sTelNumber3 = TEL_NUMBER3;
$sTelNumber3 = Core::factory('Core_Xml_Entity')->name('TEL_NUMBER3')->value($sTelNumber3);
$Shop_Controller_Show->addEntity($sTelNumber3);
/**
* << Конец
* @author Malinovskii Aleksandr, KAD Systems (©) 2015
* @date 23-11-2015
*/


/**
* поиск по имени и артикулу
*
* @author Malinovskii Aleksandr, KAD Systems (©) 2015
* @date 23-11-2015   
* Начало >>
*/
//переменная состояния, 0-каталог, 1-поиск
// $isSearch = 0;

// if ($words = Core_Array::getGet('search')) {
//    //количество найденных позиций
//    $total_search = 0;
//    if (strpos($words, " - ")){
//       $arrWords = array();
//       $arrWords = explode(" - ", $words);         
      
//       $oShopItems = $Shop_Controller_Show->shopItems()
//          ->queryBuilder()
//          ->where('shop_items.name', 'LIKE', '%'.$arrWords[1].'%')
//          ->where('shop_items.marking', 'LIKE', '%'.$arrWords[0].'%')
//          ->where('shop_items.deleted','=','0')
//          ->where('shop_items.active','=','1');   
//       $aoShopItems = $Shop_Controller_Show->shopItems()->findAll(FALSE);
//       $total_search = count($aoShopItems);
//    }
//    else {
//       $words_name = str_replace('-','.',$words);
//       $words_marking = str_replace('.','-',$words);
//       $oShopItems = $Shop_Controller_Show->shopItems()
//          ->queryBuilder()
//          ->open()
//          ->where('shop_items.name', 'LIKE', '%'.$words_name.'%')
//          ->setOr()
//          ->where('shop_items.name', 'LIKE', '%'.$words_marking.'%')
//          ->setOr()
//          ->where('shop_items.marking', 'LIKE', '%'.$words_name.'%')
//          ->setOr()
//          ->where('shop_items.marking', 'LIKE', '%'.$words_marking.'%')
//          ->close()
//          ->where('shop_items.deleted','=','0')
//          ->where('shop_items.active','=','1');
//       $aoShopItems = $Shop_Controller_Show->shopItems()->findAll(FALSE);
//       $total_search = count($aoShopItems);
//    }
//    $total_search = Core::factory('Core_Xml_Entity')->name('total_search')->value($total_search);
//    $Shop_Controller_Show->addEntity($total_search);

//    $isSearch = 1;
//    $searchText = $words;
//    $searchText = Core::factory('Core_Xml_Entity')->name('searchText')->value($searchText);
//    $Shop_Controller_Show->addEntity($searchText);

// }

// $isSearch = Core::factory('Core_Xml_Entity')->name('isSearch')->value($isSearch);
// $Shop_Controller_Show->addEntity($isSearch);
/**
* << Конец
* @author Malinovskii Aleksandr, KAD Systems (©) 2015
* @date 23-11-2015
*/

/**
* Вывод блока контактов
*
* @author Grinev Vadim, KAD Systems (©) 2016   
* @date 30-09-2016   
* Начало >>
*/

ob_start();

Core_Entity::factory('Template', 24)->execute();

$sContacts = ob_get_clean();
$Shop_Controller_Show
    ->addEntity(
        Core::factory('Core_Xml_Entity')
            ->name('contacts')
            ->value($sContacts)
    );
/**
* << Конец
* @author Grinev Vadim, KAD Systems (©) 2016   
* @date 30-09-2016
*/

/**
* Сопутствующие категории
*
* @author Serikov Konstantin, KAD Systems (©) 2017   
* @date 27-02-2017   
* Начало >>
*/
if($Shop_Controller_Show->item)
{
   $oShopGroups = Core_Entity::factory('Shop_Group');
   $oShopGroups->queryBuilder()
       ->select('shop_groups.*')
       ->join('shop_items', 'shop_items.shop_group_id', '=', 'shop_groups.id', array(
           array('AND' => array('shop_items.shortcut_id', '=', $Shop_Controller_Show->item))
       ));
   $aoShopGroups = $oShopGroups->findAll();

   foreach ($aoShopGroups as $oShopGroup)
   {
      $iCurrentShopGroup = intval($oShopGroup);
      var_dump($iCurrentShopGroup);
      $sName = $oShopGroup->name;
      $sPath = $oShopGroup->path;
      while($oShopGroup->parent_id != 0)
      {
         $oShopGroupPath = Core_Entity::factory('Shop_Group');
         $oShopGroupPath->queryBuilder()->where("id", "=", $oShopGroup->parent_id);
         $aoShopGroupsPath = $oShopGroupPath->findAll();
         $sPath = $aoShopGroupsPath[0]->path . "/" . $sPath;
         $oShopGroup = $aoShopGroupsPath[0];
      }

      $Shop_Controller_Show->addEntity(
         Core::factory('Core_Xml_Entity')
            ->name('related_category')
            ->addEntity(Core::factory('Core_Xml_Entity')->name('name')->value($sName))
            ->addEntity(Core::factory('Core_Xml_Entity')->name('path')->value($sPath))
      );
   }
}
/**
* << Конец
* @author Serikov Konstantin, KAD Systems (©) 2017   
* @date 27-02-2017
*/

/**
* Рекомендуемые товары
*
* @author Serikov Konstantin, KAD Systems (©) 2017   
* @date 28-02-2017   
* Начало >>
*/
if($Shop_Controller_Show->item)
{
   $oItems = Core_Entity::factory('shop_item');
   $oItems->queryBuilder()->where('shop_group_id', '=', $Shop_Controller_Show->group);
   $aoItems = $oItems->findAll();

   for($i=0; $i<15; $i++)
   {
      $aRandomItems[$i] = rand(0, count($aoItems)-1);
   }

   foreach ($aRandomItems as $aRandomItem) {
      $Shop_Controller_Show->addEntity(
         Core::factory('Core_Xml_Entity')
            ->name('recommended_products')
            ->addEntity(Core::factory('Core_Xml_Entity')->name('name')->value($aoItems[$aRandomItem]->name))
            ->addEntity(Core::factory('Core_Xml_Entity')->name('price')->value($aoItems[$aRandomItem]->price))
            ->addEntity(Core::factory('Core_Xml_Entity')->name('marking')->value($aoItems[$aRandomItem]->marking))
            ->addEntity(Core::factory('Core_Xml_Entity')->name('path')->value($aoItems[$aRandomItem]->path))
            ->addEntity(Core::factory('Core_Xml_Entity')->name('dir')->value($aoItems[$aRandomItem]->getItemHref()))
            ->addEntity(Core::factory('Core_Xml_Entity')->name('image_large')->value($aoItems[$aRandomItem]->image_large))
      );
   }
}
/**
* << Конец
* @author Serikov Konstantin, KAD Systems (©) 2017   
* @date 28-02-2017
*/

/**
* Вывод аналогов товара исходя из его артикула
*
* @author Serikov Konstantin, KAD Systems (©) 2017   
* @date 19-05-2017   
* Начало >>
*/

$oShopItem = Core_Entity::factory('shop_item', $Shop_Controller_Show->item);
$sMarking = $oShopItem->marking;
$oItems = Core_Entity::factory('shop_item');
$oItems->queryBuilder()
         ->where(Core_QueryBuilder::expression('REPLACE(marking, ".", "-")'), '=', str_replace('.', '-', $sMarking))
         ->where('id', '!=', $Shop_Controller_Show->item)
         ->where('modification_id', '!=', $Shop_Controller_Show->item)
         ->where('id', '!=', $oShopItem->modification_id)
            ->orderBy('marking', 'DESC');
$aoItems = $oItems->findAll();

if(count($aoItems))
{
   $Core_Xml_Entity = Core::factory('Core_Xml_Entity')->name('analogs');
   foreach ($aoItems as $oItem)
   {
      $oItem->showXmlModifications(FALSE);
      $Core_Xml_Entity->addEntity($oItem);
   }
   $Shop_Controller_Show->addEntity($Core_Xml_Entity);
}
/**
* << Конец
* @author Serikov Konstantin, KAD Systems (©) 2017   
* @date 19-05-2017
*/

$Shop_Controller_Show
    ->shopItems()
    ->queryBuilder()
    ->orderBy(Core_QueryBuilder::expression('SUBSTRING(`shop_items`.`marking`, INSTR(`shop_items`.`marking`, (\'.\' | \'-\') + 1))'),
    'ASC');

$Shop_Controller_Show
   ->xsl(
      Core_Entity::factory('Xsl')->getByName($xslName)
   )
   // Выводить свойства товаров
   ->itemsProperties(TRUE)
   // Выводить специальные цены
   ->specialprices(TRUE)
   // Выводить модификации на уровне с товаром
   //->modificationsList(TRUE)
   // Режим вывода групп
   //->groupsMode('none')
   // Выводить доп. св-ва групп
    //->orderBy('marking', 'ASC')
   ->addMinMaxPrice()
   ->groupsProperties(TRUE)
   ->viewed(FALSE)
    ->show();

Буду крайне признателен если поможете
#
Re: Не работает вывод минимальной и максимальной цены в дочерних категориях
Уведомляем Вас о нарушении лицензионного договора присоединения на использование системы управления сайтом HostCMS.

В соответствии с лицензионным договором для пользователя бесплатной редакции системы:
3.3 Пользователь  бесплатной  редакции  Программного  продукта  обязан  разместить  на  главной  странице  каждого  сайта,  работающем  с использованием Программного продукта, активную, индексируемую и видимую при просмотре сайта гиперссылку «Система управления сайтом HostCMS» на сайт Производителя https://www.hostcms.ru  в сети интернет.

Приобрести коммерческую редакцию HostCMS, которая не требует размещения ссылки на сайте, можно на странице http://www.hostcms.ru/shop/
«Не выходи из комнаты, не совершай ошибку…»
Авторизация