本文整理汇总了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"]);
示例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();