當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CCatalogProductSet::deleteAllSetsByProduct方法代碼示例

本文整理匯總了PHP中CCatalogProductSet::deleteAllSetsByProduct方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCatalogProductSet::deleteAllSetsByProduct方法的具體用法?PHP CCatalogProductSet::deleteAllSetsByProduct怎麽用?PHP CCatalogProductSet::deleteAllSetsByProduct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CCatalogProductSet的用法示例。


在下文中一共展示了CCatalogProductSet::deleteAllSetsByProduct方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ImportProductSets

 function ImportProductSets()
 {
     if ($this->bCatalog && $this->next_step["SETS"] > 0) {
         $rsParents = $this->_xml_file->GetList(array("ID" => "asc"), array("PARENT_ID" => $this->next_step["SETS"]), array("ID", "LEFT_MARGIN", "RIGHT_MARGIN"));
         while ($arParent = $rsParents->Fetch()) {
             $arXMLElement = $this->_xml_file->GetAllChildrenArray($arParent);
             if (isset($arXMLElement[$this->mess["IBLOCK_XML2_ID"]])) {
                 $rsElement = CIBlockElement::GetList(array(), array("=XML_ID" => $arXMLElement[$this->mess["IBLOCK_XML2_ID"]], "IBLOCK_ID" => $this->next_step["IBLOCK_ID"]), false, false, array("ID", "IBLOCK_ID"));
                 if ($arDBElement = $rsElement->Fetch()) {
                     CCatalogProductSet::deleteAllSetsByProduct($arDBElement["ID"], CCatalogProductSet::TYPE_GROUP);
                     if (isset($arXMLElement[$this->mess["IBLOCK_XML2_PRODUCT_SET"]])) {
                         $arFields = array("ITEM_ID" => $arDBElement["ID"], "TYPE" => CCatalogProductSet::TYPE_GROUP, "ITEMS" => array());
                         foreach ($arXMLElement[$this->mess["IBLOCK_XML2_PRODUCT_SET"]] as $xmlSet) {
                             $arFields["ITEMS"][] = array("ITEM_ID" => $this->GetElementByXML_ID($arDBElement["IBLOCK_ID"], $xmlSet[$this->mess["IBLOCK_XML2_VALUE"]]), "SORT" => intval($xmlSet[$this->mess["IBLOCK_XML2_SORT"]]));
                         }
                         CCatalogProductSet::add($arFields);
                     }
                 }
             }
         }
     }
 }
開發者ID:nycmic,項目名稱:bittest,代碼行數:22,代碼來源:cml2.php

示例2: changeTabs

 public static function changeTabs($intIBlockID, $intID, &$arCatalog)
 {
     $result = false;
     $intIBlockID = (int) $intIBlockID;
     $intID = (int) $intID;
     if ($intIBlockID <= 0 || $intID <= 0) {
         return $result;
     }
     if (empty($arCatalog)) {
         $arCatalog = CCatalogSKU::GetInfoByIBlock($intIBlockID);
     }
     if (empty($arCatalog)) {
         return $result;
     }
     if ($arCatalog['CATALOG'] != 'Y') {
         return $result;
     }
     $intProductID = CIBlockElement::GetRealElement($intID);
     $boolFeatureSet = CBXFeatures::IsFeatureEnabled('CatCompleteSet');
     if ($boolFeatureSet) {
         if (isset($_REQUEST['groupdel']) && 'Y' == $_REQUEST['groupdel']) {
             $result = CCatalogProductSet::deleteAllSetsByProduct($intProductID, CCatalogProductSet::TYPE_GROUP);
         } elseif (isset($_REQUEST['setdel']) && 'Y' == $_REQUEST['setdel']) {
             $result = CCatalogProductSet::deleteAllSetsByProduct($intProductID, CCatalogProductSet::TYPE_SET);
         }
     }
     return $result;
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:28,代碼來源:admin_tools.php


注:本文中的CCatalogProductSet::deleteAllSetsByProduct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。