Answer the question
In order to leave comments, you need to log in
Displaying product properties in element.php file how?
It is necessary to display the value of the product property in the element.php file Output
like this
if(CModule::IncludeModule('iblock')) {
$arSort= Array("NAME"=>"ASC");
$arSelect = Array("ID","NAME", "PROPERTY_USE_NEW_TEMPLATE");
$arFilter = Array("IBLOCK_ID" => 13);
$res = CIBlockElement::GetList($arSort, $arFilter, false, false, $arSelect);
while($ob = $res->GetNextElement()){
$arFields = $ob->GetFields();
print_r( $arFields); -тут все выводится
}
print_r( $arFields); - а вот тут уже нет , как сделать так что бы переменная была доступна и все цикла?
Answer the question
In order to leave comments, you need to log in
For example like this:
var readMoreBtn = document.querySelector(".js-btn-readmore"),
readMoreContent = document.querySelector(".js-description-info");
readMoreBtn.addEventListener("click", function(event) {
event.preventDefault();
readMoreContent.classList.toggle("js-readmore-show");
this.textContent = this.textContent === 'Подробнее' ? 'Скрыть' : 'Подробнее';
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question