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


PHP CCatalog::UnLinkSKUIBlock方法代码示例

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


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

示例1: CCatalog

					}
				}
			}
		}
		// go exist iblock
		$boolCatalogUpdate = false;
		if ($boolFlag)
		{
			$DB->StartTransaction();
			$obCatalog = new CCatalog();
			foreach ($arCurrentIBlocks as $intIBlockID => $arIBlockInfo)
			{
				$boolAttr = true;
				if (isset($arIBlockInfo['UNLINK']) && 'Y' == $arIBlockInfo['UNLINK'])
				{
					$boolFlag = $obCatalog->UnLinkSKUIBlock($arIBlockInfo['PRODUCT_IBLOCK_ID']);
					if ($boolFlag)
					{
						$arIBlockInfo['PRODUCT_IBLOCK_ID'] = 0;
						$arIBlockInfo['SKU_PROPERTY_ID'] = 0;
						$boolCatalogUpdate = true;
					}
					else
					{
						$boolFlag = false;
						$ex = $APPLICATION->GetException();
						$strError = $ex->GetString();
						$strWarning .= Loc::getMessage(
							'CAT_IBLOCK_OFFERS_ERR_UNLINK_SKU',
							array(
								'#PRODUCT#' => $arIBlockInfo['INFO'],
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:31,代码来源:options.php

示例2: array

$iblockType = "catalog";
$rsIBlock = CIBlock::GetList(array(), array("XML_ID" => $iblockCode, "TYPE" => $iblockType));
$IBLOCK_CATALOG_ID = false;
if ($arIBlock = $rsIBlock->Fetch()) {
    $IBLOCK_CATALOG_ID = $arIBlock["ID"];
} else {
    $rsIBlock = CIBlock::GetList(array(), array("XML_ID" => "furniture_" . WIZARD_SITE_ID, "TYPE" => $iblockType));
    if ($arIBlock = $rsIBlock->Fetch()) {
        $IBLOCK_CATALOG_ID = $arIBlock["ID"];
    }
}
if (WIZARD_INSTALL_DEMO_DATA && $IBLOCK_CATALOG_ID) {
    $boolFlag = true;
    $arSKU = CCatalogSKU::GetInfoByProductIBlock($IBLOCK_CATALOG_ID);
    if (!empty($arSKU)) {
        $boolFlag = CCatalog::UnLinkSKUIBlock($IBLOCK_CATALOG_ID);
        if (!$boolFlag) {
            $strError = "";
            if ($ex = $APPLICATION->GetException()) {
                $strError = $ex->GetString();
            } else {
                $strError = "Couldn't unlink iblocks";
            }
            //die($strError);
        }
        $boolFlag = CIBlock::Delete($arSKU['IBLOCK_ID']);
        if (!$boolFlag) {
            $strError = "";
            if ($ex = $APPLICATION->GetException()) {
                $strError = $ex->GetString();
            } else {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:catalog.php

示例3: array

         $strWarning .= str_replace(array('#ID#'), array($OF_IBLOCK_ID), GetMessage('IB_E_RIGHTS_IBLOCK_ACCESS_DENIED')) . '<br>';
         $bVarsFromForm = true;
     }
 }
 if (!$bVarsFromForm) {
     $arSKUProp = CheckSKUProperty($ID, $OF_IBLOCK_ID);
     if ('OK' == $arSKUProp['RESULT']) {
         $intSKUPropID = $arSKUProp['VALUE'];
     } else {
         $bVarsFromForm = true;
         $strWarning .= $arSKUProp['MESSAGE'] . '<br>';
     }
 }
 if (!$bVarsFromForm) {
     if (false !== $arCatalog && 0 < intval($arCatalog['OFFERS_IBLOCK_ID']) && $arCatalog['OFFERS_IBLOCK_ID'] != $OF_IBLOCK_ID) {
         $boolFlag = $obCatalog->UnLinkSKUIBlock($ID);
     }
     if (false === $arCatalog || $arCatalog['OFFERS_IBLOCK_ID'] != $OF_IBLOCK_ID) {
         $arOffersFields = array('IBLOCK_ID' => $OF_IBLOCK_ID, 'PRODUCT_IBLOCK_ID' => $ID, 'SKU_PROPERTY_ID' => $intSKUPropID);
         $arOFCatalog = CCatalog::GetByID($OF_IBLOCK_ID);
         if ($arOFCatalog) {
             $boolFlag = $obCatalog->Update($OF_IBLOCK_ID, $arOffersFields);
         } else {
             $boolFlag = $obCatalog->Add($arOffersFields);
         }
     }
     if ($ex = $APPLICATION->GetException()) {
         $strWarning .= $ex->GetString() . "<br>";
         $bVarsFromForm = true;
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:iblock_edit.php

示例4: array

$iblockXMLFile = WIZARD_SERVICE_RELATIVE_PATH . "/xml/" . LANGUAGE_ID . "/catalog.xml";
if ($shopLocalization == "ua") {
    $iblockXMLFilePrices = WIZARD_SERVICE_RELATIVE_PATH . "/xml/" . LANGUAGE_ID . "/catalog_prices_ua.xml";
} else {
    $iblockXMLFilePrices = WIZARD_SERVICE_RELATIVE_PATH . "/xml/" . LANGUAGE_ID . "/catalog_prices.xml";
}
$iblockCode = "furniture_" . WIZARD_SITE_ID;
$iblockType = "catalog";
$rsIBlock = CIBlock::GetList(array(), array("XML_ID" => $iblockCode, "TYPE" => $iblockType));
$iblockID = false;
if ($arIBlock = $rsIBlock->Fetch()) {
    $iblockID = $arIBlock["ID"];
    if (WIZARD_INSTALL_DEMO_DATA) {
        $arCatalog = CCatalog::GetByIDExt($arIBlock["ID"]);
        if (is_array($arCatalog) && in_array($arCatalog['CATALOG_TYPE'], array('P', 'X')) == true) {
            CCatalog::UnLinkSKUIBlock($arIBlock["ID"]);
            CIBlock::Delete($arCatalog['OFFERS_IBLOCK_ID']);
        }
        CIBlock::Delete($arIBlock["ID"]);
        $iblockID = false;
        COption::SetOptionString("eshop", "demo_deleted", "N", "", WIZARD_SITE_ID);
        $dbRes = CUserTypeEntity::GetList(array(), array("ENTITY_ID" => 'IBLOCK_' . $arIBlock["ID"] . '_SECTION'));
        while ($arRes = $dbRes->Fetch()) {
            $userType = new CUserTypeEntity();
            $userType->Delete($arRes["ID"]);
        }
    }
}
$dbResultList = CCatalogGroup::GetList(array(), array("CODE" => "BASE"));
if (!$dbResultList->Fetch()) {
    $arFields = array();
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:catalog.php


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