本文整理匯總了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;
}