• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CSaleOrder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CSaleOrder的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrder类的具体用法?PHP CSaleOrder怎么用?PHP CSaleOrder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CSaleOrder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: OnBeforeUserDeleteHandler

 function OnBeforeUserDeleteHandler($user_id)
 {
     \CModule::IncludeModule("iblock");
     \CModule::IncludeModule("sale");
     //Привязки к соц. сетям
     $arrFilter = array("IBLOCK_ID" => USER_SOCIAL_IB, "PROPERTY_USER_ID" => $user_id);
     $arSelect = array("ID");
     $rsRes = \CIBlockElement::GetList($arOrder, $arrFilter, false, false, $arSelect);
     while ($arItem = $rsRes->GetNext()) {
         \CIBlockElement::Delete($arItem["ID"]);
     }
     //Удаляем записи
     $result = \Hawkart\Megatv\RecordTable::getList(array('filter' => array("UF_USER_ID" => $user_id), 'select' => array("ID")));
     while ($arRecord = $result->fetch()) {
         \CRecordEx::delete($arRecord["ID"]);
     }
     //Удаляем счет
     if ($arAccount = \CSaleUserAccount::GetByUserID($user_id, "RUR")) {
         \CSaleUserAccount::Delete($arAccount["ID"]);
     }
     //Удаляем заказы
     $arFilter = array("USER_ID" => $user_id);
     $db_sales = \CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), $arFilter);
     while ($ar_sales = $db_sales->Fetch()) {
         \CSaleOrder::Delete($ar_sales["ID"]);
     }
     //Удаляем подписки
     $result = \Hawkart\Megatv\SubscribeTable::getList(array('filter' => array("=UF_USER_ID" => $user_id), 'select' => array("ID")));
     if ($arSub = $result->fetch()) {
         \Hawkart\Megatv\SubscribeTable::delete($arSub["ID"]);
     }
 }
开发者ID:Hawkart,项目名称:megatv,代码行数:32,代码来源:CUserEx.php


示例2: onFinishChange

 /**
  * @param \DDelivery\Order\DDeliveryOrder $order
  * @throws \Bitrix\Main\ArgumentException
  */
 public function onFinishChange($order)
 {
     global $APPLICATION;
     $point = $order->getPoint();
     if ($order->type == DDeliverySDK::TYPE_SELF) {
         $replaceData = array('%1' => $order->cityName, '%2' => $point['address'], '%3' => $point['delivery_company_name'], '%4' => $point['_id'], '%5' => $point['type'] == 1 ? 'Постомат' : 'ПВЗ');
         $replaceData = $APPLICATION->ConvertCharsetArray($replaceData, 'UTF-8', SITE_CHARSET);
         $comment = GetMessage('DDELIVERY_ABOUT_SELF', $replaceData);
     } else {
         if ($order->type == DDeliverySDK::TYPE_COURIER) {
             $replaceData = array('%1' => $order->getFullAddress(), '%2' => $point['delivery_company_name']);
             $replaceData = $APPLICATION->ConvertCharsetArray($replaceData, 'UTF-8', SITE_CHARSET);
             $comment = GetMessage('DDELIVERY_ABOUT_COURIER', $replaceData);
         } else {
             $comment = 'error';
         }
     }
     $orderId = $this->formData['bx_order_id'];
     $params = array('DD_ABOUT' => $comment, 'DD_LOCAL_ID' => $order->localId);
     $orderDeliveryTableData = OrderDeliveryTable::getList(array('filter' => array('ORDER_ID' => $orderId)))->fetch();
     if ($orderDeliveryTableData) {
         OrderDeliveryTable::update($orderDeliveryTableData['ID'], array('PARAMS' => serialize($params)));
     } else {
         OrderDeliveryTable::add(array('ORDER_ID' => $orderId, 'PARAMS' => serialize($params)));
     }
     $order = CSaleOrder::GetByID($orderId);
     $arDeliveryResult = CSaleDeliveryHandler::CalculateFull('ddelivery', 'ddelivery:all', $order, CSaleLang::GetLangCurrency(SITE_ID), SITE_ID);
     if ($arDeliveryResult['RESULT'] == 'OK') {
         CSaleOrder::Update($orderId, array('PRICE_DELIVERY' => $arDeliveryResult['VALUE']));
     }
 }
开发者ID:ASDAFF,项目名称:DDelivery,代码行数:35,代码来源:DDeliveryAdminShop.php


示例3: CheckFields

 public static function CheckFields($ACTION, &$arFields, $ID = 0)
 {
     if ((is_set($arFields, "ORDER_ID") || $ACTION == "ADD") && IntVal($arFields["ORDER_ID"]) <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOPV_EMPTY_ORDER_ID"), "EMPTY_ORDER_ID");
         return false;
     }
     if ((is_set($arFields, "ORDER_PROPS_ID") || $ACTION == "ADD") && IntVal($arFields["ORDER_PROPS_ID"]) <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOPV_EMPTY_PROP_ID"), "EMPTY_ORDER_PROPS_ID");
         return false;
     }
     if (is_set($arFields, "ORDER_ID")) {
         if (!($arOrder = CSaleOrder::GetByID($arFields["ORDER_ID"]))) {
             $GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["ORDER_ID"], GetMessage("SKGOPV_NO_ORDER_ID")), "ERROR_NO_ORDER");
             return false;
         }
     }
     if (is_set($arFields, "ORDER_PROPS_ID")) {
         if (!($arOrder = CSaleOrderProps::GetByID($arFields["ORDER_PROPS_ID"]))) {
             $GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["ORDER_PROPS_ID"], GetMessage("SKGOPV_NO_PROP_ID")), "ERROR_NO_PROPERY");
             return false;
         }
         if (is_set($arFields, "ORDER_ID")) {
             $arFilter = array("ORDER_ID" => $arFields["ORDER_ID"], "ORDER_PROPS_ID" => $arFields["ORDER_PROPS_ID"]);
             if (IntVal($ID) > 0) {
                 $arFilter["!ID"] = $ID;
             }
             $dbP = CSaleOrderPropsValue::GetList(array(), $arFilter);
             if ($arP = $dbP->Fetch()) {
                 $GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOPV_DUPLICATE_PROP_ID", array("#ID#" => $arFields["ORDER_PROPS_ID"], "#ORDER_ID#" => $arFields["ORDER_ID"])), "ERROR_DUPLICATE_PROP_ID");
                 return false;
             }
         }
     }
     return True;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:35,代码来源:order_props_values.php


示例4: CheckFields

	public static function CheckFields($ACTION, &$arFields)
	{
		global $DB;

		if ((is_set($arFields, "ORDER_ID") || $ACTION=="ADD") && IntVal($arFields["ORDER_ID"])<=0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOT_EMPTY_ORDER_ID"), "ERROR_NO_ORDER_ID");
			return false;
		}
		if ((is_set($arFields, "TAX_NAME") || $ACTION=="ADD") && strlen($arFields["TAX_NAME"])<=0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOT_EMPTY_TAX_NAME"), "ERROR_NO_TAX_NAME");
			return false;
		}
		if ((is_set($arFields, "IS_PERCENT") || $ACTION=="ADD") && $arFields["IS_PERCENT"]!="Y" && $arFields["IS_PERCENT"]!="N")
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOT_EMPTY_TAX_VALUE"), "ERROR_NO_IS_PERCENT");
			return false;
		}
		if ((is_set($arFields, "IS_IN_PRICE") || $ACTION=="ADD") && $arFields["IS_IN_PRICE"]!="Y" && $arFields["IS_IN_PRICE"]!="N")
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOT_EMPTY_IN_PRICE"), "ERROR_NO_IS_IN_PRICE");
			return false;
		}

		if (is_set($arFields, "VALUE") || $ACTION=="ADD")
		{
			$arFields["VALUE"] = str_replace(",", ".", $arFields["VALUE"]);
			$arFields["VALUE"] = DoubleVal($arFields["VALUE"]);
			if ($arFields["VALUE"] <= 0)
			{
				$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOT_EMPTY_SUM"), "ERROR_NO_VALUE");
				return false;
			}
		}
		if (is_set($arFields, "VALUE_MONEY") || $ACTION=="ADD")
		{
			$arFields["VALUE_MONEY"] = str_replace(",", ".", $arFields["VALUE_MONEY"]);
			$arFields["VALUE_MONEY"] = DoubleVal($arFields["VALUE_MONEY"]);
		}
		if ((is_set($arFields, "VALUE_MONEY") || $ACTION=="ADD") && $arFields["VALUE_MONEY"]<=0)
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SKGOT_EMPTY_SUM_MONEY"), "ERROR_NO_VALUE_MONEY");
			return false;
		}

		if (is_set($arFields, "ORDER_ID"))
		{
			if (!($arOrder = CSaleOrder::GetByID($arFields["ORDER_ID"])))
			{
				$GLOBALS["APPLICATION"]->ThrowException(str_replace("#ID#", $arFields["ORDER_ID"], GetMessage("SKGOT_NO_ORDER")), "ERROR_NO_ORDER");
				return false;
			}
		}

		if ((is_set($arFields, "CODE") || $ACTION=="ADD") && strlen($arFields["CODE"])<=0)
			$arFields["CODE"] = false;

		return true;
	}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:60,代码来源:order_tax.php


示例5: OnBasketAddHandler

function OnBasketAddHandler($ID, $arFields)
{
    global $USER;
    \Bitrix\Main\Loader::includeModule('catalog');
    \Bitrix\Main\Loader::includeModule('sale');
    if ($USER->IsAuthorized()) {
        $arFilter = array("USER_ID" => $USER->GetID());
        $db_sales = CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), $arFilter);
        $arrCount = [];
        while ($ar_sales = $db_sales->Fetch()) {
            $arrCount[] = $ar_sales;
        }
        if (is_array($arrCount) == false) {
            $res = CCatalogDiscount::SetCoupon('SL-CDUEA-HI8MMPY');
            //3%
        } else {
            if (count($arrCount) >= 1) {
                $resClean = CCatalogDiscount::ClearCoupon('SL-CDUEA-HI8MMPY');
                $res5 = CCatalogDiscount::SetCoupon('SL-0JG2C-XIHBEYZ');
                //5%
            } else {
            }
        }
    } else {
        $res = CCatalogDiscountCoupon::SetCoupon('SL-CDUEA-HI8MMPY');
        //3%
    }
}
开发者ID:VitaliiSestrenskyi,项目名称:sest,代码行数:28,代码来源:CCatalogDiscount.php


示例6: DoPayOrderFromAccount

 static function DoPayOrderFromAccount($userId, $currency, $orderId, $orderSum, $arOptions, &$arErrors)
 {
     if (!array_key_exists("ONLY_FULL_PAY_FROM_ACCOUNT", $arOptions)) {
         $arOptions["ONLY_FULL_PAY_FROM_ACCOUNT"] = COption::GetOptionString("sale", "ONLY_FULL_PAY_FROM_ACCOUNT", "N");
     }
     $dbUserAccount = CSaleUserAccount::GetList(array(), array("USER_ID" => $userId, "CURRENCY" => $currency));
     $arUserAccount = $dbUserAccount->Fetch();
     if (!$arUserAccount) {
         return false;
     }
     if ($arUserAccount["CURRENT_BUDGET"] <= 0) {
         return false;
     }
     if ($arOptions["ONLY_FULL_PAY_FROM_ACCOUNT"] == "Y" && doubleval($arUserAccount["CURRENT_BUDGET"]) < doubleval($orderSum)) {
         return false;
     }
     $withdrawSum = CSaleUserAccount::Withdraw($userId, $orderSum, $currency, $orderId);
     if ($withdrawSum > 0) {
         $arFields = array("SUM_PAID" => $withdrawSum, "USER_ID" => $userId);
         CSaleOrder::Update($orderId, $arFields);
         if ($withdrawSum == $orderSum) {
             CSaleOrder::PayOrder($orderId, "Y", False, False);
         }
         return true;
     }
     return false;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:27,代码来源:user.php


示例7: chStatusOld

 public static function chStatusOld($id, $status)
 {
     try {
         self::$o_erip = new \Dm\Erip();
         self::$opt_status = \Bitrix\Main\Config\Option::get(self::$module_id, "order_status_code_erip");
         self::$opt_payment = \Bitrix\Main\Config\Option::get(self::$module_id, "payment_system_id");
         self::$values = CSaleOrder::GetList(array(), array("ID" => $id), false, false, array("ID", "PAY_SYSTEM_ID", "PRICE", "CURRENCY", "STATUS_ID"))->Fetch();
         if (self::$values["PAY_SYSTEM_ID"] == self::$opt_payment && $status != self::$values["STATUS_ID"] && $status == self::$opt_status) {
             static::setTehnicalInfo();
             static::setUserInfo();
             static::setMoneyInfo();
             $r = self::$o_erip->submit();
             self::$o_response = json_decode($r);
             if (isset(self::$o_response->errors)) {
                 throw new \Exception(self::$o_response->message);
             }
             if (CSaleOrder::Update($id, array("COMMENTS" => "status: " . self::$o_response->transaction->status . "\n" . "transaction_id: " . self::$o_response->transaction->transaction_id . "\n" . "order_id: " . self::$o_response->transaction->order_id . "\n" . "account_number: " . self::$o_response->transaction->erip->account_number . "\n"))) {
                 static::sendMail();
             }
             return true;
         }
     } catch (Exception $e) {
         $GLOBALS["APPLICATION"]->ThrowException($e->getMessage());
         return false;
     }
 }
开发者ID:dimabresky,项目名称:bitrix-Erip-module,代码行数:26,代码来源:Handlers.php


示例8: getOrderInfo

 protected static function getOrderInfo($orderId)
 {
     // order itself
     $order = \CSaleOrder::getById($orderId);
     // buyer info
     $siteUserId = $order['USER_ID'];
     $phone = '';
     $email = '';
     $result = \CSaleOrderPropsValue::GetList(array(), array("ORDER_ID" => $orderId));
     while ($row = $result->fetch()) {
         if (empty($phone) && stripos($row['CODE'], 'PHONE') !== false) {
             $stPhone = static::normalizePhoneNumber($row['VALUE']);
             if (!empty($stPhone)) {
                 $phone = sha1($stPhone);
             }
         }
         if (empty($email) && stripos($row['CODE'], 'EMAIL') !== false) {
             if (!empty($row['VALUE'])) {
                 $email = sha1($row['VALUE']);
             }
         }
     }
     // products info
     $products = array();
     $result = \CSaleBasket::getList(array(), $arFilter = array('ORDER_ID' => $orderId), false, false, array('PRODUCT_ID'));
     while ($row = $result->fetch()) {
         $products[] = array('product_id' => $row['PRODUCT_ID'], 'recommendation' => '0');
     }
     // all together
     $data = array('order_id' => $orderId, 'user_id' => $siteUserId, 'phone' => $phone, 'email' => $email, 'products' => $products);
     return $data;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:32,代码来源:catalog.php


示例9: mark_order_as_error

	protected function mark_order_as_error($order, array $data) {
		CSaleOrder::Update($order['ID'], array(
			'PS_STATUS' => 'N',
			'PS_SUM' => $data['amount'],
			'PS_CURRENCY' => $data['currency'],
			'PS_STATUS_MESSAGE' => $data['message'],
			'PS_RESPONSE_DATE' => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat('FULL', LANG))),
		));
	}
开发者ID:ASDAFF,项目名称:bitrix-futupayments,代码行数:9,代码来源:result_rec.php


示例10: isDeliveryInOrders

 protected static function isDeliveryInOrders($deliveryId)
 {
     $dbOrders = \CSaleOrder::GetList(array(), array("DELIVERY_ID" => $deliveryId), false, false, array("ID"));
     if ($dbOrders->Fetch()) {
         $result = true;
     } else {
         $result = false;
     }
     return $result;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:10,代码来源:table.php


示例11: OnSalePayOrderHandler

 /**
  *	Обработчик события подтверждения оплаты товара
  */
 function OnSalePayOrderHandler($id, $val)
 {
     $currentUserId = $GLOBALS['USER']->GetID();
     //Идентификатор текущего пользователя, по идее администратор
     $idRatingGroup = 5;
     //группа акции
     $curTo = "UAH";
     //тип гривневой цены
     $arOrder = CSaleOrder::GetByID($id);
     //информация о заказе
     $price = CCurrencyRates::ConvertCurrency(floatval($arOrder["SUM_PAID"]), $arOrder["CURRENCY"], $curTo);
     $price = intval(ceil($price));
     //стоимость заказа
     $userId = intval($arOrder["USER_ID"]);
     //пользователь, который оплатил заказ
     $arUserData = CUser::GetByID($userId)->Fetch();
     //Информация о пользователе
     $userGroups = CUser::GetUserGroup($userId);
     //ИД групп, к которым принадлежит пользователь
     //Если пользователя нет в акционной группе, и он совершил заказ более чем на 900 грн, то добавить его в группу
     if (!in_array($idRatingGroup, $userGroups)) {
         if ($price >= 900 && $price <= 4000 && $val === 'Y') {
             $userGroups[] = $idRatingGroup;
             CUser::SetUserGroup($userId, $userGroups);
         }
     }
     $points = $price * 5;
     $payedUser = new CUser();
     //Если оплата подтверждается, то добавить баллы
     if ($val === 'Y' && in_array($idRatingGroup, $userGroups)) {
         $points = intval($arUserData['UF_ACTION_POINTS']) + $points;
         $payedUser->Update($userId, array("UF_ACTION_POINTS" => $points, "UF_DATE_LAST_BUY" => $arOrder["DATE_UPDATE_FORMAT"]));
     } else {
         if ($val === 'N') {
             $price = CCurrencyRates::ConvertCurrency(floatval($arOrder["PRICE"]), $arOrder["CURRENCY"], $curTo);
             $price = intval(ceil($price));
             //вычитаем полную стоимость
             $points = $price * 5;
             if ($arUserData['UF_ACTION_POINTS'] >= $points) {
                 $points = intval($arUserData['UF_ACTION_POINTS']) - $points;
                 $payedUser->Update($userId, array("UF_ACTION_POINTS" => $points));
                 //Если очков стало меньше 4500, то исключаем пользователя из группы участников
                 if (in_array($idRatingGroup, $userGroups) && $points < 4500) {
                     $indexGroup = array_search($idRatingGroup, $userGroups);
                     if (isset($userGroups[$indexGroup])) {
                         unset($userGroups[$indexGroup]);
                         CUser::SetUserGroup($userId, $userGroups);
                     }
                 }
             }
         }
     }
     unset($payedUser);
 }
开发者ID:lenchv,项目名称:estore_additionl_work,代码行数:57,代码来源:rarus_event.php


示例12: OnSaleCancelOrderHandler

 public static function OnSaleCancelOrderHandler($ID, $val) {
   if ( $val == 'Y' && self::$cancel ) {
     $arOrder = CSaleOrder::GetByID($ID);
     $resPaySystemAction = CSalePaySystemAction::GetList(array(), array('PAY_SYSTEM_ID'=>$arOrder['PAY_SYSTEM_ID'], 'PERSON_TYPE_ID'=>$arOrder['PERSON_TYPE_ID']), false, false, array());
     $arPaySystemAction = $resPaySystemAction->GetNext();
     $urlCancel = $_SERVER['DOCUMENT_ROOT'].$arPaySystemAction['ACTION_FILE'].'/cancel.php';
     if (preg_match('/\/alfabank$/', $arPaySystemAction['ACTION_FILE']) && file_exists($urlCancel)) {
       include $urlCancel;
     }
   }
 }
开发者ID:ASDAFF,项目名称:bitrix-2,代码行数:11,代码来源:handler.php


示例13: OnBeforeEventAddHandler

 public static function OnBeforeEventAddHandler(&$event, &$lid, &$arFields)
 {
     if ($event == "SALE_NEW_ORDER") {
         $orderId = $arFields['ORDER_ID'];
         $dbOrderProps = CSaleOrderPropsValue::GetList(array("CODE" => "ASC"), array("ORDER_ID" => $orderId, "CODE" => array("ORDER_PHONE", "ORDER_ADDRESS", "ORDER_ADDRESS_DETAILS", "ORDER_NAME")));
         while ($arOrderProps = $dbOrderProps->GetNext()) {
             $arFields[$arOrderProps['CODE']] = $arOrderProps['~VALUE'];
         }
         $arFields["ORDER_DESCRIPTION"] = trim(CSaleOrder::GetByID($orderId)["USER_DESCRIPTION"]);
     }
 }
开发者ID:rasuldev,项目名称:torino,代码行数:11,代码来源:eventhandlers.php


示例14: OnSalePayOrder

 public static function OnSalePayOrder($id, $paid)
 {
     if (Loader::includeModule('conversion') && ($row = \CSaleOrder::GetById($id))) {
         if ($paid == 'Y') {
             $context = DayContext::getEntityItemInstance('sale_order', $id);
             $context->addCurrencyCounter('sale_payment_sum_add', $row['PRICE'], $row['CURRENCY']);
             if (defined('ADMIN_SECTION') && ADMIN_SECTION === true) {
                 $context->addCounter('sale_payment_add_day', 1);
             } else {
                 $context->addDayCounter('sale_payment_add_day', 1);
             }
         }
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:14,代码来源:handlers.php


示例15: getEdit

    public static function getEdit(Order $order, \CUser $user, $showCancel, $showSaveButton)
    {
        $data = self::prepareData($order);
        if ($showCancel) {
            $bUserCanCancelOrder = \CSaleOrder::CanUserCancelOrder($order->getId(), $user->GetUserGroupArray(), $user->GetID());
        } else {
            $bUserCanCancelOrder = false;
        }
        $result = '
			<table border="0" cellspacing="0" cellpadding="0" width="100%" class="adm-detail-content-table edit-table">
				<tbody>
					<tr>
						<td class="adm-detail-content-cell-l" width="40%">' . Loc::getMessage("SALE_ORDER_STATUS_CREATED") . ':</td>
						<td class="adm-detail-content-cell-r">
							<div>' . $data["DATE_INSERT"] . '&nbsp;<a href="/bitrix/admin/user_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $data["CREATOR_USER_ID"] . '">' . htmlspecialcharsbx($data["CREATOR_USER_NAME"]) . '</a>
							</div>
						</td>
					</tr>
					<tr>
						<td class="adm-detail-content-cell-l">' . Loc::getMessage("SALE_ORDER_STATUS_LAST_MODIF") . ':</td>
						<td class="adm-detail-content-cell-r"><div>' . $data["DATE_UPDATE"] . '</div></td>
					</tr>
					<tr>
						<td class="adm-detail-content-cell-l">' . Loc::getMessage("SALE_ORDER_STATUS_SITE") . ':</td>
						<td class="adm-detail-content-cell-r"><div>' . htmlspecialcharsbx(\Bitrix\Sale\Helpers\Admin\OrderEdit::getSiteName($order->getSiteId())) . '</div></td>
					</tr>';
        if (strlen($data['SOURCE_NAME']) > 0) {
            $result .= '<tr>' . '<td class="adm-detail-content-cell-l">' . Loc::getMessage("SALE_ORDER_STATUS_SOURCE") . ':</td>' . '<td class="adm-detail-content-cell-r">' . $data['SOURCE_NAME'] . '</td>' . '</tr>';
        }
        $result .= '<tr>
						<td class="adm-detail-content-cell-l">' . Loc::getMessage("SALE_ORDER_STATUS") . ':</td>
						<td class="adm-detail-content-cell-r">' . \Bitrix\Sale\Helpers\Admin\OrderEdit::makeSelectHtml("STATUS_ID", self::getStatusesList($user->GetID(), $data["STATUS_ID"]), $data["STATUS_ID"], false, array("class" => "adm-bus-select", "id" => "STATUS_ID"));
        if ($showSaveButton) {
            $result .= '
									&nbsp;
									<span id="save_status_button" class="adm-btn" onclick="BX.Sale.Admin.OrderEditPage.onSaveStatusButton(\'' . $order->getId() . '\',\'STATUS_ID\');">
										' . Loc::getMessage("SALE_ORDER_STATUS_SAVE") . '
									</span>';
        }
        $result .= '</td>
			</tr>';
        if ($showCancel && $bUserCanCancelOrder) {
            $result .= self::getCancelBlockHtml($order, $data);
        }
        $result .= '</tbody>
			</table>
			';
        return $result;
    }
开发者ID:webgksupport,项目名称:alpina,代码行数:49,代码来源:orderstatus.php


示例16: OnSalePayOrder

 public static function OnSalePayOrder($ID, $val)
 {
     $ID = intval($ID);
     if ($ID > 0 && $val == 'Y') {
         $arOrder = array();
         $dbBasketItems = CSaleBasket::GetList(array(), array('ORDER_ID' => $ID), false, false, array('ID', 'MODULE', 'CATALOG_XML_ID', 'QUANTITY'));
         while ($arItems = $dbBasketItems->Fetch()) {
             if ($arItems['MODULE'] == 'asd.money' && !empty($arItems['CATALOG_XML_ID']) && strpos($arItems['CATALOG_XML_ID'], '@') !== false) {
                 if (empty($arOrder)) {
                     $rsOrders = CSaleOrder::GetList(array(), array('ID' => $ID), false, false, array('ID', 'USER_ID'));
                     $arOrder = $rsOrders->Fetch();
                     if (empty($arOrder)) {
                         return;
                     }
                 }
                 list($amount, $curr) = explode('@', $arItems['CATALOG_XML_ID']);
                 CSaleUserAccount::UpdateAccount($arOrder['USER_ID'], doubleval($amount) * doubleval($arItems['QUANTITY']), $curr, GetMessage('ASD_MODULE_TRANSACT_PREPAID'), $ID);
             }
         }
     }
 }
开发者ID:Hawkart,项目名称:megatv,代码行数:21,代码来源:include.php


示例17: urlencode

 // Address
 $parms .= "&COMMENT1=" . urlencode($ORDER_ID);
 $parms .= "&COMMENT2=" . urlencode($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT"]);
 $ret_com = "{$strExePath} {$PF_HOST} {$PF_PORT} \"{$parms}\" 30";
 putenv("PFPRO_CERT_PATH=" . $PFPRO_CERT_PATH);
 putenv("LD_LIBRARY_PATH=" . $strExeDir);
 exec($ret_com, $arOutput, $ret_var);
 $strOutput = $arOutput[0];
 parse_str($strOutput, $arResult);
 if (is_array($arResult) && strlen($arResult["RESULT"]) > 0) {
     $arFields = array("PS_STATUS" => $arResult["RESULT"] == 0 ? "Y" : "N", "PS_STATUS_CODE" => $arResult["RESULT"], "PS_STATUS_DESCRIPTION" => $arResult["RESPMSG"] . " - " . $arResult["PREFPSMSG"], "PS_STATUS_MESSAGE" => $arResult["PNREF"], "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))));
     $arResult["RESULT"] = IntVal($arResult["RESULT"]);
     if ($arResult["RESULT"] == 0) {
         CSaleOrder::PayOrder($ORDER_ID, "Y");
     }
     CSaleOrder::Update($ORDER_ID, $arFields);
     $arResult["RESULT"] = IntVal($arResult["RESULT"]);
     if ($arResult["RESULT"] == 0) {
         $bNonePay = False;
     } else {
         if ($arResult["RESULT"] < 0) {
             $strErrorTmp .= "Communication Error: [" . $arResult["RESULT"] . "] " . $arResult["RESPMSG"] . " - " . $arResult["PREFPSMSG"] . ". ";
         } elseif ($arPaySysRes_tmp["RESULT"] == 125) {
             $strErrorTmp .= "Your payment is declined by Fraud Service. Please contact us to make payment. ";
         } elseif ($arResult["RESULT"] == 126) {
             $strErrorTmp .= "Your payment is under review by Fraud Service. We contact you in 48 hours to get more specific information. ";
         } elseif (is_set($arErrorCodes, $arResult["RESULT"])) {
             $strErrorTmp .= $arErrorCodes[$arResult["RESULT"]] . ". ";
         } else {
             $strErrorTmp .= "Unknown error. ";
         }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:payment.php


示例18: ToUpper

    if ($lmi_payee_purse != $IdM) {
        $err = 3;
        $err_text = 'ERR: НЕВЕРЕН ID МАГАЗИНА : ' . $lmi_payee_purse;
    }
    if ($lmi_prerequest == 1) {
        if ($err != 0) {
            echo $err_text;
        } else {
            echo 'YES';
        }
    } else {
        $common_string = $lmi_payee_purse . $lmi_payment_amount . $lmi_payment_no . $lmi_mode . $lmi_sys_invs_no . $lmi_sys_trans_no . $lmi_sys_trans_date . $sk . $lmi_payer_purse . $lmi_payer_wm;
        $hash = ToUpper(md5($common_string));
        if ($err == 0) {
            if ($hash == $lmi_hash) {
                $strPS_STATUS_DESCRIPTION = "";
                $strPS_STATUS_DESCRIPTION .= "Идентификатор магазина - " . $lmi_payee_purse . "; ";
                $strPS_STATUS_DESCRIPTION .= "Внутренний номер платежа  в системе Z-PAYMENT - " . $lmi_sys_invs_no . "; ";
                $strPS_STATUS_DESCRIPTION .= "Внутренний номер счета в системе Z-PAYMENT - " . $lmi_sys_trans_no . "; ";
                $strPS_STATUS_DESCRIPTION .= "дата платежа - " . $lmi_sys_trans_date . "";
                $strPS_STATUS_MESSAGE = "";
                $strPS_STATUS_MESSAGE .= "кошелек покупателя или его e-mail  - " . $lmi_payer_purse . "; ";
                $arFields = array("PS_STATUS" => "Y", "PS_STATUS_CODE" => "-", "PS_STATUS_DESCRIPTION" => $strPS_STATUS_DESCRIPTION, "PS_STATUS_MESSAGE" => $strPS_STATUS_MESSAGE, "PS_SUM" => $lmi_payment_amount, "PS_CURRENCY" => $arOrder["CURRENCY"], "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))), "USER_ID" => $arOrder["USER_ID"]);
                // You can comment this code if you want PAYED flag not to be set automatically
                CSaleOrder::PayOrder($arOrder["ID"], "Y");
                CSaleOrder::Update($arOrder["ID"], $arFields);
            }
        }
    }
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:z_payment_result.php


示例19: array

?>
<div class="row"> 
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12 col-lg-push-8 col-md-push-8"> 
    <div class="heading"> 
      <h4>Мой кабинет</h4>
     </div>
   <?php 
$APPLICATION->IncludeComponent("bitrix:menu", "vertical_left_menu", array("ROOT_MENU_TYPE" => "left", "MAX_LEVEL" => "1", "CHILD_MENU_TYPE" => "left", "USE_EXT" => "N", "DELAY" => "N", "ALLOW_MULTI_SELECT" => "N", "MENU_CACHE_TYPE" => "N", "MENU_CACHE_TIME" => "3600", "MENU_CACHE_USE_GROUPS" => "Y", "MENU_CACHE_GET_VARS" => array()));
?>
 </div>
 
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 col-lg-pull-4 col-md-pull-4"> <?php 
if ($USER->IsAuthorized() && CModule::IncludeModule("sale")) {
    $arOrders = array();
    $arFilter = array("USER_ID" => $USER->GetID(), "STATUS_ID" => "F");
    $rsSales = CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), $arFilter);
    while ($arSales = $rsSales->Fetch()) {
        $arOrders[] = $arSales["ID"];
    }
    $dbBasketItems = CSaleBasket::GetList(array("NAME" => "ASC", "ID" => "ASC"), array("ORDER_ID" => $arOrders), false, false, array("PRODUCT_ID"));
    while ($arItems = $dbBasketItems->Fetch()) {
        $arBasketItems[] = $arItems["PRODUCT_ID"];
    }
    $arFilter = array("IBLOCK_ID" => 31, "ACTIVE" => "Y", "PROPERTY_Linked_Goods" => $arBasketItems);
}
?>
 <?php 
if (!empty($arBasketItems) && !empty($arOrders) && $USER->IsAuthorized() || $USER->isAdmin()) {
    ?>
 
    <h3>Релизы </h3>
开发者ID:Okhremchuk,项目名称:Ingenum,代码行数:31,代码来源:index.php


示例20: GetList

 function GetList($arOrder = array("ID" => "DESC"), $arFilter = array(), $arGroupBy = false, $arNavStartParams = false, $arSelectFields = array())
 {
     global $DB;
     if (array_key_exists("DATE_FROM", $arFilter)) {
         $val = $arFilter["DATE_FROM"];
         unset($arFilter["DATE_FROM"]);
         $arFilter[">=DATE_CREATE"] = $val;
     }
     if (array_key_exists("DATE_TO", $arFilter)) {
         $val = $arFilter["DATE_TO"];
         unset($arFilter["DATE_TO"]);
         $arFilter["<=DATE_CREATE"] = $val;
     }
     if (count($arSelectFields) <= 0) {
         $arSelectFields = array("ID", "BASKET_ID", "BARCODE", "STORE_ID", "QUANTITY", "DATE_CREATE", "DATE_MODIFY", "CREATED_BY", "MODIFIED_BY");
     } elseif (in_array("*", $arSelectFields)) {
         $arSelectFields = array("ID", "BASKET_ID", "BARCODE", "STORE_ID", "QUANTITY", "DATE_CREATE", "DATE_MODIFY", "CREATED_BY", "MODIFIED_BY");
     }
     // FIELDS -->
     $arFields = array("ID" => array("FIELD" => "SB.ID", "TYPE" => "int"), "BASKET_ID" => array("FIELD" => "SB.BASKET_ID", "TYPE" => "int"), "BARCODE" => array("FIELD" => "SB.BARCODE", "TYPE" => "string"), "STORE_ID" => array("FIELD" => "SB.STORE_ID", "TYPE" => "int"), "QUANTITY" => array("FIELD" => "SB.QUANTITY", "TYPE" => "double"), "DATE_CREATE" => array("FIELD" => "SB.DATE_CREATE", "TYPE" => "datetime"), "CREATED_BY" => array("FIELD" => "SB.CREATED_BY", "TYPE" => "int"), "DATE_MODIFY" => array("FIELD" => "SB.DATE_MODIFY", "TYPE" => "datetime"), "MODIFIED_BY" => array("FIELD" => "SB.MODIFIED_BY", "TYPE" => "int"));
     // <-- FIELDS
     $arSqls = CSaleOrder::PrepareSql($arFields, $arOrder, $arFilter, $arGroupBy, $arSelectFields);
     $arSqls["SELECT"] = str_replace("%%_DISTINCT_%%", "", $arSqls["SELECT"]);
     if (is_array($arGroupBy) && count($arGroupBy) == 0) {
         $strSql = "SELECT " . $arSqls["SELECT"] . " " . "FROM b_sale_store_barcode SB " . "\t" . $arSqls["FROM"] . " ";
         if (strlen($arSqls["WHERE"]) > 0) {
             $strSql .= "WHERE " . $arSqls["WHERE"] . " ";
         }
         if (strlen($arSqls["GROUPBY"]) > 0) {
             $strSql .= "GROUP BY " . $arSqls["GROUPBY"] . " ";
         }
         //echo "!1!=".htmlspecialcharsbx($strSql)."<br>";
         $dbRes = $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
         if ($arRes = $dbRes->Fetch()) {
             return $arRes["CNT"];
         } else {
             return False;
         }
     }
     $strSql = "SELECT " . $arSqls["SELECT"] . " " . "FROM b_sale_store_barcode SB " . "\t" . $arSqls["FROM"] . " ";
     if (strlen($arSqls["WHERE"]) > 0) {
         $strSql .= "WHERE " . $arSqls["WHERE"] . " ";
     }
     if (strlen($arSqls["GROUPBY"]) > 0) {
         $strSql .= "GROUP BY " . $arSqls["GROUPBY"] . " ";
     }
     if (strlen($arSqls["ORDERBY"]) > 0) {
         $strSql .= "ORDER BY " . $arSqls["ORDERBY"] . " ";
     }
     if (is_array($arNavStartParams) && IntVal($arNavStartParams["nTopCount"]) <= 0) {
         $strSql_tmp = "SELECT COUNT('x') as CNT " . "FROM b_sale_store_barcode SB " . "\t" . $arSqls["FROM"] . " ";
         if (strlen($arSqls["WHERE"]) > 0) {
             $strSql_tmp .= "WHERE " . $arSqls["WHERE"] . " ";
         }
         if (strlen($arSqls["GROUPBY"]) > 0) {
             $strSql_tmp .= "GROUP BY " . $arSqls["GROUPBY"] . " ";
         }
         //echo "!2.1!=".htmlspecialcharsbx($strSql_tmp)."<br>";
         $dbRes = $DB->Query($strSql_tmp, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
         $cnt = 0;
         if (strlen($arSqls["GROUPBY"]) <= 0) {
             if ($arRes = $dbRes->Fetch()) {
                 $cnt = $arRe 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CSaleOrderProps类代码示例发布时间:2022-05-20
下一篇:
PHP CSaleLocation类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap