Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question