G
G
GoldSlide2020-10-02 09:19:50
JavaScript
GoldSlide, 2020-10-02 09:19:50

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

2 answer(s)
P
Pashenka, 2015-12-28
@Chekhoved

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 === 'Подробнее' ? 'Скрыть' : 'Подробнее';
});

V
VZVZ, 2015-12-28
@VZVZ

Why not google javascript toggle innerhtml? Moreover, the question is rather trivial and there should be many different answers.
For example:
stackoverflow.com/questions/9694346/toggle-innerhtml

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question