本文整理汇总了PHP中CSaleOrderPropsValue::DeleteByOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrderPropsValue::DeleteByOrder方法的具体用法?PHP CSaleOrderPropsValue::DeleteByOrder怎么用?PHP CSaleOrderPropsValue::DeleteByOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleOrderPropsValue
的用法示例。
在下文中一共展示了CSaleOrderPropsValue::DeleteByOrder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: str_replace
if (!$res) {
if ($ex = $APPLICATION->GetException()) {
$errorMessage .= $ex->GetString();
} else {
$errorMessage .= str_replace("#NAME#", $arTaxList[$j]["TAX_NAME"], GetMessage("SOE_ERROR_SAVE_TAX")) . ". ";
}
}
}
}
foreach ($arOldTaxList as $key => $value) {
CSaleOrderTax::Delete($key);
}
}
if (strlen($errorMessage) <= 0) {
for ($i = 0; $i < count($arIDs); $i++) {
CSaleOrderPropsValue::DeleteByOrder($arIDs[$i]);
for ($j = 0; $j < count($arPropsList); $j++) {
$arFields = array("ORDER_ID" => $arIDs[$i], "ORDER_PROPS_ID" => $arPropsList[$j]["ORDER_PROPS_ID"], "NAME" => $arPropsList[$j]["NAME"], "CODE" => $arPropsList[$j]["CODE"], "VALUE" => $arPropsList[$j]["VALUE"]);
$res = CSaleOrderPropsValue::Add($arFields) > 0;
if (!$res) {
if ($ex = $APPLICATION->GetException()) {
$errorMessage .= $ex->GetString();
} else {
$errorMessage .= str_replace("#NAME#", $arPropsList[$j]["NAME"], GetMessage("SOE_ERROR_SAVE_PROP")) . ". ";
}
}
}
}
}
if (strlen($errorMessage) <= 0) {
if (!$customTabber->Action()) {
示例2: _Delete
function _Delete($ID)
{
global $DB;
$ID = IntVal($ID);
$bSuccess = True;
foreach (GetModuleEvents("sale", "OnBeforeOrderDelete", true) as $arEvent) {
if (ExecuteModuleEventEx($arEvent, array($ID)) === false) {
return false;
}
}
$DB->StartTransaction();
if ($bSuccess) {
$dbBasket = CSaleBasket::GetList(array(), array("ORDER_ID" => $ID));
while ($arBasket = $dbBasket->Fetch()) {
$bSuccess = CSaleBasket::Delete($arBasket["ID"]);
if (!$bSuccess) {
break;
}
}
}
if ($bSuccess) {
$dbRecurring = CSaleRecurring::GetList(array(), array("ORDER_ID" => $ID));
while ($arRecurring = $dbRecurring->Fetch()) {
$bSuccess = CSaleRecurring::Delete($arRecurring["ID"]);
if (!$bSuccess) {
break;
}
}
}
if ($bSuccess) {
$bSuccess = CSaleOrderPropsValue::DeleteByOrder($ID);
}
if ($bSuccess) {
$bSuccess = CSaleOrderTax::DeleteEx($ID);
}
if ($bSuccess) {
$bSuccess = CSaleUserTransact::DeleteByOrder($ID);
}
if ($bSuccess) {
unset($GLOBALS["SALE_ORDER"]["SALE_ORDER_CACHE_" . $ID]);
}
if ($bSuccess) {
$bSuccess = $DB->Query("DELETE FROM b_sale_order WHERE ID = " . $ID . "", true);
}
if ($bSuccess) {
$DB->Commit();
} else {
$DB->Rollback();
}
foreach (GetModuleEvents("sale", "OnOrderDelete", true) as $arEvent) {
ExecuteModuleEventEx($arEvent, array($ID, $bSuccess));
}
return $bSuccess;
}
示例3: _Delete
function _Delete($ID)
{
global $DB, $USER_FIELD_MANAGER;
$ID = IntVal($ID);
$bSuccess = True;
foreach(GetModuleEvents("sale", "OnBeforeOrderDelete", true) as $arEvent)
if (ExecuteModuleEventEx($arEvent, Array($ID))===false)
return false;
$DB->StartTransaction();
if ($bSuccess)
{
$dbBasket = CSaleBasket::GetList(array(), array("ORDER_ID" => $ID));
while ($arBasket = $dbBasket->Fetch())
{
if (CSaleBasketHelper::isSetItem($arBasket)) // set items are deleted when parent is deleted
continue;
$bSuccess = CSaleBasket::Delete($arBasket["ID"]);
if (!$bSuccess)
break;
}
}
if ($bSuccess)
{
$dbRecurring = CSaleRecurring::GetList(array(), array("ORDER_ID" => $ID));
while ($arRecurring = $dbRecurring->Fetch())
{
$bSuccess = CSaleRecurring::Delete($arRecurring["ID"]);
if (!$bSuccess)
break;
}
}
if ($bSuccess)
$bSuccess = CSaleOrderPropsValue::DeleteByOrder($ID);
if ($bSuccess)
$bSuccess = CSaleOrderTax::DeleteEx($ID);
if($bSuccess)
$bSuccess = CSaleUserTransact::DeleteByOrder($ID);
if ($bSuccess)
unset($GLOBALS["SALE_ORDER"]["SALE_ORDER_CACHE_".$ID]);
if ($bSuccess)
$bSuccess = $DB->Query("DELETE FROM b_sale_order WHERE ID = ".$ID."", true);
if ($bSuccess)
$USER_FIELD_MANAGER->Delete("ORDER", $ID);
if ($bSuccess)
$DB->Commit();
else
$DB->Rollback();
foreach(GetModuleEvents("sale", "OnOrderDelete", true) as $arEvent)
ExecuteModuleEventEx($arEvent, Array($ID, $bSuccess));
return $bSuccess;
}