当前位置: 首页>>代码示例>>PHP>>正文


PHP CCatalog::Delete方法代码示例

本文整理汇总了PHP中CCatalog::Delete方法的典型用法代码示例。如果您正苦于以下问题:PHP CCatalog::Delete方法的具体用法?PHP CCatalog::Delete怎么用?PHP CCatalog::Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCatalog的用法示例。


在下文中一共展示了CCatalog::Delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

							if (
								$arCurValues['SUBSCRIPTION'] != $arIBlockInfo['SUBSCRIPTION']
								|| $arCurValues['PRODUCT_IBLOCK_ID'] != $arIBlockInfo['PRODUCT_IBLOCK_ID']
								|| $arCurValues['YANDEX_EXPORT'] != $arIBlockInfo['YANDEX_EXPORT']
								|| $arCurValues['VAT_ID'] != $arIBlockInfo['VAT_ID']
							)
							{
								$boolCatalogUpdate = true;
							}
							if ($arIBlockInfo['YANDEX_EXPORT']=="Y")
								$bNeedAgent = true;
						}
					}
					elseif ($boolExists && $arIBlockInfo['CATALOG']!="Y" && $arIBlockInfo['SUBSCRIPTION']!="Y" && 0 == $arIBlockInfo['PRODUCT_IBLOCK_ID'])
					{
						if (!CCatalog::Delete($arIBlockInfo['ID']))
						{
							$boolFlag = false;
							$strWarning .= Loc::getMessage("CAT_DEL_CATALOG1").' '.$arIBlockInfo['INFO'].' '.Loc::getMessage("CAT_DEL_CATALOG2").".<br />";
						}
						else
						{
							$boolCatalogUpdate = true;
						}
					}
					elseif ($arIBlockInfo['CATALOG']=="Y" || $arIBlockInfo['SUBSCRIPTION']=="Y" || 0 < $arIBlockInfo['PRODUCT_IBLOCK_ID'])
					{
						$boolAttr = $obCatalog->Add(array(
							'IBLOCK_ID' => $arIBlockInfo['ID'],
							'YANDEX_EXPORT' => $arIBlockInfo['YANDEX_EXPORT'],
							'SUBSCRIPTION' => $arIBlockInfo['SUBSCRIPTION'],
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:31,代码来源:options.php

示例2: array

 $arOffersFields = array('IBLOCK_ID' => $ID, 'SUBSCRIPTION' => $SUBSCRIPTION, 'YANDEX_EXPORT' => $YANDEX_EXPORT, 'VAT_ID' => $VAT_ID);
 if (false == $arCatalog || 'P' == $arCatalog['CATALOG_TYPE']) {
     if ($IS_CATALOG == 'Y') {
         $boolFlag = $obCatalog->Add($arOffersFields);
     }
     if ($boolFlag && $arOffersFields['YANDEX_EXPORT'] == 'Y') {
         $boolNeedAgent = true;
     }
 } else {
     if ($IS_CATALOG == 'Y' || $SUBSCRIPTION == 'Y') {
         $boolFlag = $obCatalog->Update($ID, $arOffersFields);
         if ($boolFlag) {
             $boolNeedAgent = $YANDEX_EXPORT != $arCatalog['YANDEX_EXPORT'];
         }
     } elseif ('Y' != $IS_CATALOG && 'Y' != $SUBSCRIPTION) {
         $boolFlag = $obCatalog->Delete($ID);
         if ($boolFlag) {
             $boolNeedAgent == ('Y' == $arCatalog['YANDEX_EXPORT']);
         }
     }
 }
 if (!$boolFlag) {
     $bVarsFromForm = true;
     if ($ex = $APPLICATION->GetException()) {
         $strWarning .= $ex->GetString() . "<br>";
     }
 }
 if (!$bVarsFromForm) {
     // start offers
     if ('Y' == $USED_SKU) {
         if (0 == $OF_IBLOCK_ID) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:iblock_edit.php

示例3: OnIBlockDelete

 public static function OnIBlockDelete($ID)
 {
     return CCatalog::Delete($ID);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:4,代码来源:catalog.php

示例4: array

     $boolAttr = $obCatalog->Update($intIBlockID, array('IBLOCK_ID' => $arIBlockInfo['ID'], "YANDEX_EXPORT" => $arIBlockInfo['YANDEX_EXPORT'], "SUBSCRIPTION" => $arIBlockInfo['SUBSCRIPTION'], "VAT_ID" => $arIBlockInfo['VAT_ID'], "PRODUCT_IBLOCK_ID" => $arIBlockInfo['PRODUCT_IBLOCK_ID'], 'SKU_PROPERTY_ID' => $arIBlockInfo['SKU_PROPERTY_ID']));
     if (false == $boolAttr) {
         $ex = $APPLICATION->GetException();
         $strError = $ex->GetString();
         $strWarning .= str_replace(array('#PRODUCT#', '#ERROR#'), array($arIBlockInfo['INFO'], $strError), GetMessage('CAT_IBLOCK_OFFERS_ERR_CAT_UPDATE')) . '<br />';
         $boolFlag = false;
     } else {
         if ($ar_res1['SUBSCRIPTION'] != $arIBlockInfo['SUBSCRIPTION'] || intval($ar_res1['PRODUCT_IBLOCK_ID']) != intval($arIBlockInfo['PRODUCT_IBLOCK_ID']) || $ar_res1['YANDEX_EXPORT'] != $arIBlockInfo['YANDEX_EXPORT'] || $ar_res1['VAT_ID'] != $arIBlockInfo['VAT_ID']) {
             $boolCatalogUpdate = true;
         }
         if ($arIBlockInfo['YANDEX_EXPORT'] == "Y") {
             $bNeedAgent = True;
         }
     }
 } elseif ($arIBlockInfo['CATALOG'] != "Y" && $arIBlockInfo['SUBSCRIPTION'] != "Y" && 0 == $arIBlockInfo['PRODUCT_IBLOCK_ID'] && $ar_res1) {
     if (CCatalog::Delete($arIBlockInfo['ID']) === False) {
         $boolFlag = false;
         $strWarning .= GetMessage("CAT_DEL_CATALOG1") . ' ' . $arIBlockInfo['INFO'] . ' ' . GetMessage("CAT_DEL_CATALOG2") . ".<br />";
     } else {
         $boolCatalogUpdate = true;
     }
 } elseif ($arIBlockInfo['CATALOG'] == "Y" || $arIBlockInfo['SUBSCRIPTION'] == "Y" || 0 < $arIBlockInfo['PRODUCT_IBLOCK_ID']) {
     $boolAttr = $obCatalog->Add(array('IBLOCK_ID' => $arIBlockInfo['ID'], "YANDEX_EXPORT" => $arIBlockInfo['YANDEX_EXPORT'], "SUBSCRIPTION" => $arIBlockInfo['SUBSCRIPTION'], "VAT_ID" => $arIBlockInfo['VAT_ID'], "PRODUCT_IBLOCK_ID" => $arIBlockInfo['PRODUCT_IBLOCK_ID'], 'SKU_PROPERTY_ID' => $arIBlockInfo['SKU_PROPERTY_ID']));
     if (false == $boolAttr) {
         $ex = $APPLICATION->GetException();
         $strError = $ex->GetString();
         $strWarning .= str_replace(array('#PRODUCT#', '#ERROR#'), array($arIBlockInfo['INFO'], $strError), GetMessage('CAT_IBLOCK_OFFERS_ERR_CAT_ADD')) . '<br />';
         $boolFlag = false;
     } else {
         if ($arIBlockInfo['YANDEX_EXPORT'] == "Y") {
             $bNeedAgent = True;
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:options.php

示例5: Delete

 public static function Delete($ID)
 {
     if (!CModule::IncludeModule('catalog')) {
         return false;
     }
     self::$LAST_ERROR = '';
     global $DB;
     $tableName = CCrmCatalog::TABLE_NAME;
     $ID = intval($ID);
     if (!is_array(self::GetByID($ID))) {
         // Is no exists
         return true;
     }
     $events = GetModuleEvents('crm', 'OnBeforeCrmCatalogDelete');
     while ($arEvent = $events->Fetch()) {
         if (ExecuteModuleEventEx($arEvent, array($ID)) === false) {
             return false;
         }
     }
     $dbRes = CCrmProduct::GetList(array(), array('CATALOG_ID' => $ID), array('ID'));
     while ($arRes = $dbRes->Fetch()) {
         $productID = $arRes['ID'];
         if (!CCrmProduct::Delete($productID)) {
             self::RegisterError(sprintf('Deletion of CrmCatalog(ID=%d) is canceled. Could not delete CrmProduct(ID = %d).', $ID, $productID));
             return false;
         }
     }
     if (!$DB->Query('DELETE FROM ' . $tableName . ' WHERE ID = ' . $ID, true)) {
         return false;
     }
     // -------------- remove from catalog module -------------->
     $CCatalog = new CCatalog();
     if (!$CCatalog->Delete($ID)) {
         return false;
     }
     // <-------------- remove from catalog module --------------
     CCrmEntityHelper::RemoveCached(self::CACHE_NAME, $ID);
     $events = GetModuleEvents('crm', 'OnCrmCatalogDelete');
     while ($arEvent = $events->Fetch()) {
         ExecuteModuleEventEx($arEvent, array($ID));
     }
     return true;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:43,代码来源:crm_catalog.php

示例6: OnIBlockDelete

 function OnIBlockDelete($ID)
 {
     return CCatalog::Delete($ID);
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:4,代码来源:catalog.php


注:本文中的CCatalog::Delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。