當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CSaleOrderUserProps::ClearEmpty方法代碼示例

本文整理匯總了PHP中CSaleOrderUserProps::ClearEmpty方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSaleOrderUserProps::ClearEmpty方法的具體用法?PHP CSaleOrderUserProps::ClearEmpty怎麽用?PHP CSaleOrderUserProps::ClearEmpty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CSaleOrderUserProps的用法示例。


在下文中一共展示了CSaleOrderUserProps::ClearEmpty方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Delete

 function Delete($ID)
 {
     global $DB;
     $ID = IntVal($ID);
     $db_orderProps = CSaleOrderProps::GetList($by = "PROPS_GROUP_ID", $order = "ASC", array("PROPS_GROUP_ID" => $ID));
     while ($arOrderProps = $db_orderProps->Fetch()) {
         $DB->Query("DELETE FROM b_sale_order_props_variant WHERE ORDER_PROPS_ID = " . $arOrderProps["ID"] . "", true);
         $DB->Query("UPDATE b_sale_order_props_value SET ORDER_PROPS_ID = NULL WHERE ORDER_PROPS_ID = " . $arOrderProps["ID"] . "", true);
         $DB->Query("DELETE FROM b_sale_user_props_value WHERE ORDER_PROPS_ID = " . $arOrderProps["ID"] . "", true);
     }
     $DB->Query("DELETE FROM b_sale_order_props WHERE PROPS_GROUP_ID = " . $ID . "", true);
     CSaleOrderUserProps::ClearEmpty();
     return $DB->Query("DELETE FROM b_sale_order_props_group WHERE ID = " . $ID . "", true);
 }
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:14,代碼來源:order_props_group.php

示例2: Delete

 function Delete($ID)
 {
     global $DB;
     $ID = IntVal($ID);
     $DB->Query("DELETE FROM b_sale_order_props_variant WHERE ORDER_PROPS_ID = " . $ID . "", true);
     $DB->Query("UPDATE b_sale_order_props_value SET ORDER_PROPS_ID = NULL WHERE ORDER_PROPS_ID = " . $ID . "", true);
     $DB->Query("DELETE FROM b_sale_user_props_value WHERE ORDER_PROPS_ID = " . $ID . "", true);
     CSaleOrderUserProps::ClearEmpty();
     return $DB->Query("DELETE FROM b_sale_order_props WHERE ID = " . $ID . "", true);
 }
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:10,代碼來源:order_props.php

示例3: Delete

 /**
  * <p>Функция удаляет свойство с кодом ID заказа. Существующие в базе значения этого свойства отвязываются от удаляемого свойства. Удаляются связанные значения из профиля покупателя. </p>
  *
  *
  *
  *
  * @param int $ID  Код удаляемого свойства.
  *
  *
  *
  * @return bool <p>Возвращается <i>true</i> в случае успешного удаления и <i>false</i> - в
  * случае ошибки.</p> <a name="examples"></a>
  *
  *
  * <h4>Example</h4> 
  * <pre>
  * &lt;?
  * if (!CSaleOrderProps::Delete(12))
  *    echo "Ошибка удаления свойства";
  * ?&gt;
  * </pre>
  *
  *
  * @static
  * @link http://dev.1c-bitrix.ru/api_help/sale/classes/csaleorderprops/csaleorderprops__delete.75442e5e.php
  * @author Bitrix
  */
 public static function Delete($ID)
 {
     global $DB;
     $ID = intval($ID);
     if ($ID <= 0) {
         return false;
     }
     foreach (GetModuleEvents("sale", "OnBeforeOrderPropsDelete", true) as $arEvent) {
         if (ExecuteModuleEventEx($arEvent, array($ID)) === false) {
             return false;
         }
     }
     $DB->Query("DELETE FROM b_sale_order_props_variant WHERE ORDER_PROPS_ID = " . $ID, true);
     $DB->Query("UPDATE b_sale_order_props_value SET ORDER_PROPS_ID = NULL WHERE ORDER_PROPS_ID = " . $ID, true);
     $DB->Query("DELETE FROM b_sale_user_props_value WHERE ORDER_PROPS_ID = " . $ID, true);
     $DB->Query("DELETE FROM b_sale_order_props_relation WHERE PROPERTY_ID = " . $ID, true);
     CSaleOrderUserProps::ClearEmpty();
     foreach (GetModuleEvents("sale", "OnOrderPropsDelete", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent, array($ID));
     }
     return $DB->Query("DELETE FROM b_sale_order_props WHERE ID = " . $ID, true);
 }
開發者ID:rasuldev,項目名稱:torino,代碼行數:49,代碼來源:order_props.php


注:本文中的CSaleOrderUserProps::ClearEmpty方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。