當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。