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


PHP CSaleOrderPropsValue::DeleteByOrder方法代码示例

本文整理汇总了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()) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_edit.php

示例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;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:54,代码来源:order.php

示例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;
	}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:67,代码来源:order.php


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