P
P
photosho2019-06-20 10:48:59
1C-Bitrix
photosho, 2019-06-20 10:48:59

Why are products from inactive sections displayed in the catalog?

Bitrix in the "catalog" component shows (and counts when displaying the quantity) elements from inactive sections. Moreover, the section itself is not displayed in the list of sections. Is this his normal behavior? Can I turn it off somehow?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Prilepa, 2019-06-20
@OAPrilepa

This is normal behavior, sections and elements are different entities and have different activity flags.
If you want all elements bound to it to be automatically deactivated when the IB section is deactivated, you need to write an OnAfterIBlockSectionUpdate event handler and use the \CIBlockElement::GetList request to get all the elements and update each one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question