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


PHP CPrice::DeleteByProduct方法代码示例

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


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

示例1: str_replace

                     $arUpdatedIDs[] = $ID_tmp;
                     if (!$ID_tmp) {
                         $strWarning .= str_replace("#PRICE#", $arCatalogFields["PRICE"], GetMessage("C2IT_ERROR_SAVEPRICE")) . "<br>";
                     }
                 }
             } else {
                 $ID_tmp = CPrice::Add($arCatalogFields);
                 $arUpdatedIDs[] = $ID_tmp;
                 if (!$ID_tmp) {
                     $strWarning .= str_replace("#PRICE#", $arCatalogFields["PRICE"], GetMessage("C2IT_ERROR_SAVEPRICE")) . "<br>";
                 }
             }
         }
     }
 }
 CPrice::DeleteByProduct($PRODUCT_ID, $arUpdatedIDs);
 \Bitrix\Iblock\PropertyIndex\Manager::updateElementIndex($IBLOCK_ID, $PRODUCT_ID);
 if ($arCatalog["SUBSCRIPTION"] == "Y") {
     $arCurProductGroups = array();
     $dbProductGroups = CCatalogProductGroups::GetList(array(), array("PRODUCT_ID" => $ID), false, false, array("ID", "GROUP_ID", "ACCESS_LENGTH", "ACCESS_LENGTH_TYPE"));
     while ($arProductGroup = $dbProductGroups->Fetch()) {
         $arCurProductGroups[IntVal($arProductGroup["GROUP_ID"])] = $arProductGroup;
     }
     $arAvailContentGroups = array();
     $availContentGroups = COption::GetOptionString("catalog", "avail_content_groups");
     if (strlen($availContentGroups) > 0) {
         $arAvailContentGroups = explode(",", $availContentGroups);
     }
     $dbGroups = CGroup::GetList($b = "c_sort", $o = "asc", array("ANONYMOUS" => "N"));
     while ($arGroup = $dbGroups->Fetch()) {
         $arGroup["ID"] = intval($arGroup["ID"]);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:product_edit_action.php

示例2: array

     if (!$res) {
         $strWarning .= $bs->LAST_ERROR . "<br>";
     } else {
         $ipropValues = new \Bitrix\Iblock\InheritedProperty\ElementValues($IBLOCK_ID, $ID);
         $ipropValues->clearValues();
     }
     if ('' == $strWarning && $bCatalog) {
         $arCatalogItem = array('IBLOCK_ID' => $IBLOCK_ID, 'SECTION_ID' => $MENU_SECTION_ID, 'ID' => $ID, 'PRODUCT_ID' => CIBlockElement::GetRealElement($ID));
         if ($arShowTabs['catalog']) {
             include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/catalog/admin/templates/product_edit_action.php";
         } elseif ($arShowTabs['sku']) {
             if (!CCatalogProduct::IsExistProduct($arCatalogItem['PRODUCT_ID'])) {
                 $arEmptyProduct = array('ID' => $arCatalogItem['PRODUCT_ID'], 'QUANTITY' => 0, 'QUANTITY_TRACE' => 'N', 'CAN_BUY_ZERO' => 'N', 'NEGATIVE_AMOUNT_TRACE' => 'N', 'TYPE' => CCatalogProduct::TYPE_SKU);
                 CCatalogProduct::Add($arEmptyProduct, false);
             }
             CPrice::DeleteByProduct($arCatalogItem['PRODUCT_ID']);
         }
         if ($arShowTabs['product_set']) {
             CCatalogAdminProductSetEdit::setProductFormParams(array('TYPE' => CCatalogProductSet::TYPE_SET));
             CCatalogAdminProductSetEdit::saveFormValues($arCatalogItem);
         }
         if ($arShowTabs['product_group']) {
             CCatalogAdminProductSetEdit::setProductFormParams(array('TYPE' => CCatalogProductSet::TYPE_GROUP));
             CCatalogAdminProductSetEdit::saveFormValues($arCatalogItem);
         }
     }
 }
 // if ($strWarning)
 if ($bBizproc) {
     if ($strWarning == '') {
         $arBizProcWorkflowId = array();
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:iblock_element_edit.php


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