[QUOTE] написал:
[QUOTE] [URL=/community/webdev/user/7068014/]Артём Жуковский[/URL], написал:
[CODE] <? $arCurPriceType = current( $arResult [ 'PRICE_MATRIX' ][ 'COLS' ]); [/CODE] [/QUOTE]
Попробуйте так [CODE] //сейчас
<? $arCurPriceType = current( $arResult [ 'PRICE_MATRIX' ][ 'COLS' ]);
$arCurPrice = current( $arResult [ 'PRICE_MATRIX' ][ 'MATRIX' ][ $arCurPriceType [ 'ID' ]]);
$min_price_id = $arCurPriceType [ 'ID' ]; ?>
//после правки
<? if (is_array( $arResult [ 'PRICE_MATRIX' ][ 'COLS' ]) && is_array( $arResult [ 'PRICE_MATRIX' ][ 'MATRIX' ]) ) {
$arCurPriceType = current( $arResult [ 'PRICE_MATRIX' ][ 'COLS' ]);
$arCurPrice = current( $arResult [ 'PRICE_MATRIX' ][ 'MATRIX' ][ $arCurPriceType [ 'ID' ]]);
$min_price_id = $arCurPriceType [ 'ID' ];
} ?>
[/CODE] Но боюсь, это не последняя ошибка. АспроНекст не обновлен скорее всего.[/QUOTE]
код вставил, но Вы были правы, к сожалению((((, теперь пишет:[QUOTE][TypeError]
count(): Argument #1 ($value) must be of type Countable|array, string given (0)
/home/nkaby/public_html/bitrix/templates/aspro_next/components/bitrix/catalog.element/main2_custom/template.php:1396
#0: include
/home/nkaby/public_html/bitrix/modules/main/classes/general/component_template.php:790
#1: CBitrixComponentTemplate->__IncludePHPTemplate
/home/nkaby/public_html/bitrix/modules/main/classes/general/component_template.php:885
#2: CBitrixComponentTemplate->IncludeTemplate
/home/nkaby/public_html/bitrix/modules/main/classes/general/component.php:776
#3: CBitrixComponent->showComponentTemplate
/home/nkaby/public_html/bitrix/modules/main/classes/general/component.php:716
#4: CBitrixComponent->includeComponentTemplate
/home/nkaby/public_html/bitrix/modules/iblock/lib/component/base.php:4707
#5: Bitrix\Iblock\Component\Base->loadData
/home/nkaby/public_html/bitrix/modules/iblock/lib/component/base.php:4686
#6: Bitrix\Iblock\Component\Base->initialLoadAction
/home/nkaby/public_html/bitrix/modules/iblock/lib/component/element.php:284
#7: Bitrix\Iblock\Component\Element->initialLoadAction
#8: call_user_func
/home/nkaby/public_html/bitrix/modules/iblock/lib/component/base.php:4873
#9: Bitrix\Iblock\Component\Base->doAction
/home/nkaby/public_html/bitrix/modules/iblock/lib/component/base.php:4891
#10: Bitrix\Iblock\Component\Base->executeComponent
/home/nkaby/public_html/bitrix/modules/main/classes/general/component.php:660
#11: CBitrixComponent->includeComponent
/home/nkaby/public_html/bitrix/modules/main/classes/general/main.php:1072
#12: CAllMain->IncludeComponent
/home/nkaby/public_html/bitrix/templates/aspro_next/components/bitrix/catalog/main/page_blocks/element_custom.php:2
#13: include_once(string)
/home/nkaby/public_html/bitrix/templates/aspro_next/components/bitrix/catalog/main/element_normal.php:80
#14: include_once(string)
/home/nkaby/public_html/bitrix/templates/aspro_next/components/bitrix/catalog/main/element.php:149
#15: include(string)
/home/nkaby/public_html/bitrix/modules/main/classes/general/component_template.php:790
#16: CBitrixComponentTemplate->__IncludePHPTemplate
/home/nkaby/public_html/bitrix/modules/main/classes/general/component_template.php:885
#17: CBitrixComponentTemplate->IncludeTemplate
/home/nkaby/public_html/bitrix/modules/main/classes/general/component.php:776
#18: CBitrixComponent->showComponentTemplate
/home/nkaby/public_html/bitrix/modules/main/classes/general/component.php:716
#19: CBitrixComponent->includeComponentTemplate
/home/nkaby/public_html/bitrix/components/bitrix/catalog/component.php:323
#20: include(string)
/home/nkaby/public_html/bitrix/modules/main/classes/general/component.php:607
#21: CBitrixComponent->__includeComponent
/home/nkaby/public_html/bitrix/modules/main/classes/general/component.php:684
#22: CBitrixComponent->includeComponent
/home/nkaby/public_html/bitrix/modules/main/classes/general/main.php:1072
#23: CAllMain->IncludeComponent
/home/nkaby/public_html/catalog/index.php:584
#24: include_once(string)
/home/nkaby/public_html/bitrix/modules/main/include/urlrewrite.php:184
#25: include_once(string)
/home/nkaby/public_html/bitrix/urlrewrite.php:2
----------[/QUOTE]
строка 1396:
[CODE]<span itemprop="value">
<?if(count($arProp["DISPLAY_VALUE"]) > 1):?>
<?=implode(', ', $arProp["DISPLAY_VALUE"]);?>
<?else:?>
<?=$arProp["DISPLAY_VALUE"];?>
<?endif;?>
</span>
[/CODE]