foreach ($fieldsClear as &$oneValue) { if (isset($arOldAvailContentGroups[$oneValue])) unset($arOldAvailContentGroups[$oneValue]); } if (isset($oneValue)) unset($oneValue); } Option::set('catalog', 'avail_content_groups', implode(',', $fieldsClear), ''); if (!empty($arOldAvailContentGroups)) { $arOldAvailContentGroups = array_keys($arOldAvailContentGroups); foreach ($arOldAvailContentGroups as &$oneValue) { CCatalogProductGroups::DeleteByGroup($oneValue); } unset($oneValue); } } $checkboxFields = array( 'save_product_without_price', 'show_catalog_tab_with_offers', 'default_quantity_trace', 'default_can_buy_zero', 'default_subscribe', 'product_form_show_offers_iblock', 'product_form_simple_search' );
function OnGroupDelete($ID) { CCatalogProductGroups::DeleteByGroup($ID); }