U
U
unlik2019-11-14 01:30:39
1C-Bitrix
unlik, 2019-11-14 01:30:39

Displaying items in the Bitrix cart?

There is a standard Bitrix basket template.
Elements are displayed inside tr
. I need to make sure that pending items are not displayed.
Therefore, I wrap tr in the basket-item.php file in such a cycle

<?
    foreach ($arResult["GRID"]["ROWS"] as $k => $arItem) {
        if ($arItem["DELAY"] == "N") {
            ?>

 <? 
       }
    }
    ?>

But all the same, pending ones are displayed.
Moreover, if in the same file under tr I create my own block for displaying basket items without using the standard structure from tables, then the cycle works as it should.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zhyeba, 2019-11-14
@zhyeba

well, if the condition does not work, then it is false (cap)
do var_dump($arItem) in the body of the loop and see what the value of $arItem["DELAY"] is for each product and whether it exists at all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question