本文整理汇总了PHP中getOrder函数的典型用法代码示例。如果您正苦于以下问题:PHP getOrder函数的具体用法?PHP getOrder怎么用?PHP getOrder使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getOrder函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getOrderOp
function getOrderOp()
{
if (getOrder() == 'asc') {
return 'desc';
} else {
return 'asc';
}
}
开发者ID:thezawad,项目名称:vakuum,代码行数:8,代码来源:function.php
示例2: getVcode
getVcode();
break;
case 'upload':
uploadFile($uri);
break;
case 'files':
files();
break;
case 'dxyzm':
dxyzm();
break;
case 'cleartmpuserphone':
clearTmpUserPhone();
break;
case 'getOrder':
getOrder();
break;
case 'orderNotify':
orderNotify();
break;
default:
ABase::toJson(1, 'Error code 404');
}
function getCountys()
{
$pid = isset($_GET['pid']) ? (int) $_GET['pid'] : 0;
$ajax = isset($_GET['ajax']) ? (int) $_GET['ajax'] : 0;
$countys = Countys::getCountys($pid);
if ($ajax) {
ABase::toJson(0, 'OK', $countys);
}
开发者ID:isonz,项目名称:fxptpcn,代码行数:31,代码来源:public.php
示例3: session_start
* the buyer gets redirected here post approval / cancellation of
* payment.
*/
require_once __DIR__ . '/../bootstrap.php';
session_start();
if (!isSignedIn()) {
header('Location: ../user/sign_in.php');
exit;
}
if (isset($_GET['success'])) {
// We were redirected here from PayPal after the buyer approved/cancelled
// the payment
if ($_GET['success'] == 'true' && isset($_GET['PayerID']) && isset($_GET['orderId'])) {
$orderId = $_GET['orderId'];
try {
$order = getOrder($orderId);
$payment = executePayment($order['payment_id'], $_GET['PayerID']);
updateOrder($orderId, $payment->getState());
$messageType = "success";
$message = "Your payment was successful. Your order id is {$orderId}.";
} catch (\PayPal\Exception\PPConnectionException $ex) {
$message = parseApiError($ex->getData());
$messageType = "error";
} catch (Exception $ex) {
$message = $ex->getMessage();
$messageType = "error";
}
} else {
$messageType = "error";
$message = "Your payment was cancelled.";
}
开发者ID:msusoko,项目名称:rest-api-sample-app-php,代码行数:31,代码来源:order_completion.php
示例4: trim
/**
* A Resoruce List for Products to include HTTP Verbs
* Switch Statement used for HTTP Verbs (GET, POST, DELETE, and PATCH)
* Server Request_Method is an array which contains information of paths and locations
* Routing for Products Starts Here
*/
// Remove white space (trim) and check if variable is set and not empty(isset)
$pathParts = trim(isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/', '/');
$pathParts = explode('/', $pathParts);
switch ($_SERVER['REQUEST_METHOD']) {
// Gets List of all products or single product using GET Method
case 'GET':
if (empty($pathParts[1])) {
echo getOrders();
} else {
echo getOrder($pathParts[1]);
}
break;
// Create product on database using POST and view it using GET Method
// Create product on database using POST and view it using GET Method
case 'POST':
postOrders(json_decode(file_get_contents('php://input')));
break;
// Delete requrested product from database using DELETE Method
// Delete requrested product from database using DELETE Method
case 'DELETE':
if (empty($pathParts[1])) {
echo "you can delete everthing!!";
} else {
deleteOrders($pathParts[1]);
}
开发者ID:Zain-Ali,项目名称:Capture-Cart,代码行数:31,代码来源:index.php
示例5: either
function either($a, $b) { if ($a != NULL) return $a; return $b;}
$TMG_PK_SERVER_ADDR = CSalePaySystemAction::GetParamValue("TMG_PK_SERVER_ADDR");
$user_id = (int)$GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["USER_ID"];
$sum = (float)either(
CSalePaySystemAction::GetParamValue("SHOULD_PAY"),
$GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"]);
$orderid = (int)either(
CSalePaySystemAction::GetParamValue("ORDER_ID"),
$GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]);
$email = either($GLOBALS["SALE_INPUT_PARAMS"]["PROPERTY"]["EMAIL"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["USER_EMAIL"]);
$phone = htmlspecialchars($GLOBALS['SALE_INPUT_PARAMS']['PROPERTY']['PHONE']);
// --- BEGIN --- костыль для arteva
$arOrder = getOrder($orderid);
$user_id = $arOrder["ACCOUNT_NUMBER"]; // вместо пользователя передаём номер заказа (не ID)
// --- END ---
$opts = array ("sum"=>$sum, "user_id"=>$user_id);
$payment_parameters = array("clientid"=>$user_id, "orderid"=>$orderid, "sum"=>$sum, "phone"=>$phone, "email"=>$email);
$query = http_build_query($payment_parameters);
$err_num = $err_text = NULL;
$form = QueryGetData($TMG_PK_SERVER_ADDR, 80, "/external/", $query, $err_num, $err_text);
if ($form == "")
$form = "<h3>Произошла ошибка при инциализации платежа</h3><p>$err_num: ".htmlspecialchars($err_text)."</p>";
?>
<div id='tmg_pk_form_container'>
<?php
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:payment.php
示例6: getOrderViaJS
function getOrderViaJS($exchange, $product, $level, $user)
{
if ($_SESSION["instabid_userId"] == NULL) {
return '{"result":"FAIL","msg":"Sorry but this user is unidentified creating a risk of outside fraudulent access. You have to call the function authorize_user_to_bid(userId) in instabid.php first"}';
} else {
//return $_SESSION["instabid_userId"];
return getOrder($exchange, $product, $level, $user);
}
}
开发者ID:ArkShen,项目名称:RedisExchange,代码行数:9,代码来源:instabid.php
示例7: generateOrderPackingSlip
/**
* Generate a packing slip for an entire order. If the order has multiple
* shipping destinations then a packing slip will be generated for each.
*
* @param int The order ID to print the packing slip for.
* @return string The generated packing slip (HTML)
*/
function generateOrderPackingSlip($orderId)
{
$db = $GLOBALS['ISC_CLASS_DB'];
// allow access to deleted orders if printing from within control panel
$isAdmin = (defined('ISC_ADMIN_CP') && ISC_ADMIN_CP);
$order = getOrder($orderId, null, null, $isAdmin);
if(empty($order) || $order['ordisdigital']) {
return false;
}
// Fetch the shipping addresses in this order
$addresses = array();
$query = "
SELECT *
FROM [|PREFIX|]order_addresses
WHERE order_id='".(int)$orderId."'
";
$result = $db->query($query);
while($address = $db->fetch($result)) {
$addresses[$address['id']] = $address;
}
// Fetch shipping details for this order too
$query = "
SELECT *
FROM [|PREFIX|]order_shipping
WHERE order_id='".(int)$orderId."'
ORDER BY order_address_id
";
$result = $db->query($query);
while($shipping = $db->fetch($result)) {
$addresses[$shipping['order_address_id']]['shipping'] = $shipping;
}
// Now fetch products
$addressProducts = array();
$query = "
SELECT *
FROM [|PREFIX|]order_products
WHERE orderorderid='".(int)$orderId."'
";
$result = $db->query($query);
while($product = $db->fetch($result)) {
// Digital item - these do not have an address
if(!$product['order_address_id']) {
continue;
}
$addressProducts[$product['order_address_id']][] = array(
'prodcode' => $product['ordprodsku'],
'prodname' => $product['ordprodname'],
'prodqty' => $product['ordprodqty'],
'prodoptions' => $product['ordprodoptions'],
'prodvariationid' => $product['ordprodvariationid'],
'prodordprodid' => $product['orderprodid'],
'prodeventdatename' => $product['ordprodeventname'],
'prodeventdate' => $product['ordprodeventdate'],
);
}
$packingSlips = '';
foreach($addresses as $addressId => $address) {
if(empty($addressProducts[$addressId])) {
continue;
}
$title = sprintf(GetLang('PackingSlipTitleOrder'), $order['orderid']);
$shipmentDetails = array(
'shipcustid' => $order['ordcustid'],
'shipping_module' => $address['shipping']['module'],
'shipmethod' => $address['shipping']['method'],
'shiporderid' => $order['orderid'],
'shiporderdate' => $order['orddate'],
'shipcomments' => $order['ordcustmessage'],
'shipbillfirstname' => $order['ordbillfirstname'],
'shipbilllastname' => $order['ordbilllastname'],
'shipbillcompany' => $order['ordbillcompany'],
'shipbillstreet1' => $order['ordbillstreet1'],
'shipbillstreet2' => $order['ordbillstreet2'],
'shipbillsuburb' => $order['ordbillsuburb'],
'shipbillstate' => $order['ordbillstate'],
'shipbillzip' => $order['ordbillzip'],
'shipbillcountry' => $order['ordbillcountry'],
'shipbillcountrycode' => $order['ordbillcountrycode'],
'shipbillcountryid' => $order['ordbillcountryid'],
'shipbillstateid' => $order['ordbillstateid'],
'shipbillphone' => $order['ordbillphone'],
'shipbillemail' => $order['ordbillemail'],
'shipshipfirstname' => $address['first_name'],
'shipshiplastname' => $address['last_name'],
'shipshipcompany' => $address['company'],
'shipshipstreet1' => $address['address_1'],
'shipshipstreet2' => $address['address_2'],
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:order.printing.php
示例8: db_connect
<?php
// Get list of all users or one in particualr if the id is given
include_once '../include/headers.php';
include_once '../include/dbutils.php';
include_once '../include/main.php';
include_once 'domain/orders.php';
db_connect();
$expand = isset($_GET['expand']) ? $_GET['expand'] : null;
$status = isset($_GET['status']) ? $_GET['status'] : null;
if (isset($_GET['id'])) {
$value = getOrder($_GET['id']);
} else {
$value = getOrders($status, $_GET['providerId'], $expand);
}
//return JSON array
exit(json_encode($value));
开发者ID:eznibe,项目名称:north-telas,代码行数:17,代码来源:orders_GET.php
示例9: handleRemoteAdminRequest
public function handleRemoteAdminRequest()
{
if (empty($_POST['orderId'])) {
exit;
}
$order = getOrder($_POST['orderId']);
$extraInfo = @unserialize($order['extrainfo']);
if (empty($order) && !is_array($extraInfo)) {
exit;
}
unset($extraInfo['cc_ccno']);
unset($extraInfo['cc_cvv2']);
unset($extraInfo['cc_name']);
unset($extraInfo['cc_ccaddress']);
unset($extraInfo['cc_cczip']);
unset($extraInfo['cc_cctype']);
unset($extraInfo['cc_ccexpm']);
unset($extraInfo['cc_ccexpy']);
if(isset($extraInfo['cc_issueno'])) {
unset($extraInfo['cc_issueno']);
}
if(isset($extraInfo['cc_issuedatey'])) {
unset($extraInfo['cc_issuedatey']);
unset($extraInfo['cc_issuedatem']);
unset($extraInfo['cc_issuedated']);
}
$updatedOrder = array(
"extrainfo" => serialize($extraInfo)
);
$GLOBALS['ISC_CLASS_DB']->UpdateQuery("orders", $updatedOrder, "orderid='".$order['orderid']."'");
echo 1;
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:37,代码来源:module.creditcardmanually.php
示例10: getOrder
echo CHtml::checkBoxList('licensesIds', $licensesIdsFilter, CHtml::listData(DriverLicenses::model()->findAll(array('order' => getOrder($licensesIdsFilter) . 'name ASC')), 'id', 'name'), array('template' => '{beginLabel}{input} {labelTitle}{endLabel}', 'separator' => ''));
?>
</div>
</td>
<td class="<?php
echo getClassName($applicantTypeIdsFilter);
?>
">
<strong><?php
echo CHtml::encode(CvList::model()->getAttributeLabel('applicantTypeIds'));
?>
</strong><br />
<input type="text" name="applicantTypesFilter" class="filter" size="10" />
<div class="div-overflow narrow">
<?php
echo CHtml::checkBoxList('applicantTypeIds', $applicantTypeIdsFilter, CHtml::listData(CvApplicantTypes::model()->findAll(array('order' => getOrder($applicantTypeIdsFilter) . 'name ASC')), 'id', 'name'), array('template' => '{beginLabel}{input} {labelTitle}{endLabel}', 'separator' => ''));
?>
</div>
</td>
</tr>
</table>
</div>
<br />
<input type="submit" class="btn btn-primary btn-small" value="Знайти" />
<input type="button" class="btn btn-primary btn-small reset" value="Скинути" onclick="$(':input','#filter').not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected'); $('#filter').submit();" />
</form>
<h4>
<?php
echo Yii::t('main', 'profiles.status.statistic');
?>
<?php
开发者ID:asopin,项目名称:portal,代码行数:31,代码来源:index.php
示例11: simplexml_load_file
<td>' . $shop_offer_type . '</td></tr><br>
<tr><td align="center" ><b>Offer Description:</b></td>
<td>' . $shop_offer_description . '</td></tr><br>
<tr><td align="center" ><b>Offer Name:</b></td>
<td>' . $shop_offer_name . '</td></tr>
<br><form action="?subtopic=shopadmin&action=addoffer" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
}
if ($action == "viewoffer") {
$items = simplexml_load_file($config['site']['server_path'] . '/data/items/items.xml') or die('<b>Could not load items!</b>');
foreach ($items->item as $v) {
$itemList[(int) $v['id']] = $v['name'];
}
$order = array("id" => "id", "points" => "points", "offer_type" => "offer_type", "itemid1" => "itemid1", "itemid2" => "itemid2");
$main_content .= '<center><table width="100%" border="1" cellspacing="0" cellpadding="4" style="text-align:center"><tr BGCOLOR="#505050"><td><font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'id') . '" class=white>ID</td><td width="5"><font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'points') . '" class=white>VIP Coins</td><td width="7">
<font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'itemid1') . '" class=white>ID Item</td><td width="5"><font color="white">Qtd.</td><td width="7"><center><font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'itemid2') . '" class=white>ID Mochila</center></td><td width="5"><font color="white">Count</td><td width="7"><font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'offer_type') . '" class=white>Tipo</td>
<td width="85"><font color="white">Descrição</td><td width="30"><font color="white">Nome</td><td width="30"></td></tr>';
$shopoffers = $SQL->query('SELECT id, points, itemid1, count1, itemid2, count2, offer_type, offer_description, offer_name, pid FROM z_shop_offer ' . makeOrder($order, 'order', 'id'));
foreach ($shopoffers as $shop) {
$main_content .= '</B><tr BGCOLOR="#D4C0A1"><td align="center">' . $shop['id'] . '<td align="center">' . $shop['points'] . '</td>';
if ($shop['itemid1'] == "0") {
$main_content .= '<td align="center">' . $shop['itemid1'] . '<br></td>';
} else {
$main_content .= '<td align="center">' . $shop['itemid1'] . '<br>(' . $itemList[(int) $shop['itemid1']] . ')</td>';
}
$main_content .= '<td align="center">' . $shop['count1'] . '</td>';
if ($shop['itemid2'] == "0") {
$main_content .= '<td align="center">' . $shop['itemid2'] . '</td>';
} else {
$main_content .= '<td align="center">' . $shop['itemid2'] . '<br>(' . $itemList[(int) $shop['itemid2']] . ')</td>';
}
开发者ID:lucasoares,项目名称:webzohcaserver,代码行数:31,代码来源:shopadmin.php
示例12: addOrder
/**
* [addOrder функция добавления заказа]
* @param array $arParams
* @return array or false
*/
function addOrder($arParams)
{
if (!CModule::IncludeModule('sale')) {
return false;
}
global $USER;
global $DB;
$addCommentsOrder = false;
$commentForManager = "";
updateBasketPreOrder();
// обновляем корзину
$arBasketItems = array();
$dbBasketItems = CSaleBasket::GetList(array("NAME" => "ASC", "ID" => "ASC"), array("FUSER_ID" => CSaleBasket::GetBasketUserID(), "LID" => SITE_ID, "ORDER_ID" => "NULL"), false, false, array("ID", "CALLBACK_FUNC", "MODULE", "PRODUCT_ID", "QUANTITY", "DELAY", "CAN_BUY", "PRICE", "WEIGHT", "NAME", "CURRENCY", "CATALOG_XML_ID", "VAT_RATE", "NOTES", "DISCOUNT_PRICE", "PRODUCT_PROVIDER_CLASS", "DIMENSIONS", "TYPE", "SET_PARENT_ID", "DETAIL_PAGE_URL"));
while ($arItem = $dbBasketItems->Fetch()) {
$arPropItem = getItemCart($arItem["PRODUCT_ID"]);
$db_res = CSaleBasket::GetPropsList(array("SORT" => "ASC", "NAME" => "ASC"), array("BASKET_ID" => $arItem['ID']), false, array());
while ($ar_res = $db_res->Fetch()) {
if ($ar_res["CODE"] == "DEPOSIT" && $ar_res["VALUE"] == "N") {
$addCommentsOrder = true;
}
}
$arBasketItems[] = $arItem;
$arItem["ARTIKUL"] = $arPropItem["PROPERTY_ARTIKUL_VALUE"];
$strOrderList .= '<a href="http://' . $_SERVER["HTTP_HOST"] . $arItem["DETAIL_PAGE_URL"] . '">' . $arItem["ARTIKUL"] . '</a> ' . $arItem["NAME"] . ' - ' . $arItem["QUANTITY"] * 1 . ' шт. x ' . SaleFormatCurrency($arItem["PRICE"], $arItem["CURRENCY"]);
$strOrderList .= "<br />";
$allDiscountItems += $arItem["DISCOUNT_PRICE"];
}
if (!$arBasketItems) {
return false;
}
$arOrderDat = CSaleOrder::DoCalculateOrder(SITE_ID, $USER->GetID(), $arBasketItems, 1, $arUserResult["ORDER_PROP"], $arParams["DELIVERY_ID"], $arParams["PAY_SYSTEM_ID"], array(), $arErrors, $arWarnings);
$arOrderDat["ORDER_PROP"][20] = $arParams["ORDER_PROP_20"];
$arOrderDat["ORDER_PROP"][7] = $arParams["ORDER_PROP_7"];
$arOrderDat["ORDER_PROP"][3] = $arParams["ORDER_PROP_3"];
//echo "<pre>";print_r($PRICE);echo "</pre>";die();
//echo "<pre>";print_r($arOrderDat);echo "</pre>";die();
//echo "<pre>";print_r($arParams);echo "</pre>";die();
$arFields = array("LID" => SITE_ID, "PERSON_TYPE_ID" => 1, "PAYED" => "N", "CANCELED" => "N", "STATUS_ID" => "N", "PRICE" => $arOrderDat["ORDER_PRICE"], "CURRENCY" => $arOrderDat["CURRENCY"], "USER_ID" => IntVal($USER->GetID()), "PAY_SYSTEM_ID" => $arOrderDat["PAY_SYSTEM_ID"], "PRICE_DELIVERY" => $arOrderDat["PRICE_DELIVERY"], "DELIVERY_ID" => $arOrderDat["DELIVERY_ID"], "DISCOUNT_VALUE" => $arOrderDat["DISCOUNT_VALUE"], "TAX_VALUE" => $arOrderDat["TAX_VALUE"], "DELIVERY_LOCATION" => $arOrderDat["DELIVERY_LOCATION"], "USER_DESCRIPTION" => $arParams["ORDER_DESCRIPTION"], "COMMENTS" => $commentForManager);
$ORDER_ID = (int) CSaleOrder::DoSaveOrder($arOrderDat, $arFields, 0, $arResult["ERROR"]);
if ($ORDER_ID > 0) {
$arOrder = getOrder($ORDER_ID);
// для менеджера
if ($addCommentsOrder === true && $arParams["PAY_SYSTEM_ID"] == 10) {
// сообщение для менеджера
$commentForManager .= 'Выбран способ оплаты PayKeeper, но в заказе есть товары "По запросу".';
$commentForManager .= "\n";
$commentForManager .= "Ссылка для оплаты: http://" . $_SERVER["HTTP_HOST"] . "/personal/order/payment/?ORDER_ID=" . $ORDER_ID;
$arFields = array("COMMENTS" => $commentForManager);
CSaleOrder::Update($ORDER_ID, $arFields);
}
// отправляем письмо
$arFieldsEvent = array("ORDER_ID" => getNumberOrder($ORDER_ID), "ORDER_DATE" => Date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT", SITE_ID))), "ORDER_USER" => $USER->GetFormattedName(false), "PRICE" => SaleFormatCurrency($arOrderDat["ORDER_PRICE"], $arOrderDat["CURRENCY"]), "BCC" => COption::GetOptionString("sale", "order_email", "order@" . $SERVER_NAME), "EMAIL" => strlen($arUserResult["USER_EMAIL"]) > 0 ? $arUserResult["USER_EMAIL"] : $USER->GetEmail(), "ORDER_LIST" => $strOrderList, "SALE_EMAIL" => COption::GetOptionString("sale", "order_email", "order@" . $SERVER_NAME), "DISCOUNT" => $allDiscountItems . " руб.", "DELIVERY_PRICE" => "", "DELIVERY_TYPE" => getDeliveryName($arOrderDat["DELIVERY_ID"]), "ADDRESS" => strlen($arParams["ORDER_PROP_7"]) > 0 ? $arParams["ORDER_PROP_7"] : "Адрес не указан", "COMMENT" => strlen($arParams["ORDER_DESCRIPTION"]) > 0 ? $arParams["ORDER_DESCRIPTION"] : "Нет комментария");
//Формируем писмо для отправки менеджеру
switch ($arParams["PAY_SYSTEM_ID"]) {
case 10:
$price_method = 'Оплата банковской картой VISA, MASTERCARD, MAESTRO';
break;
case 8:
$price_method = 'Безналичный расчет';
break;
case 1:
$price_method = 'Наличными при получении';
break;
}
$rsGroups = CGroup::GetList($by = "c_sort", $order = "asc", array("ID" => implode('|', $USER->GetUserGroupArray())));
$groups = array();
if (intval($rsGroups->SelectedRowsCount()) > 0) {
while ($arGroups = $rsGroups->Fetch()) {
if ((int) $arGroups['ID'] != 2 && (int) $arGroups['ID'] != 3 && (int) $arGroups['ID'] != 4) {
$groups[] = $arGroups['NAME'];
}
}
}
$arFieldsManager = array('NUMBER' => getNumberOrder($ORDER_ID), 'DATE' => Date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT", SITE_ID))), 'SELLER_TYPE' => implode(',', $groups), 'FIO' => $USER->GetFormattedName(false), 'PHONE' => strlen($arParams["ORDER_PROP_3"]) > 0 ? $arParams["ORDER_PROP_3"] : "Телефон не указан", 'EMAIL' => $USER->GetEmail(), 'ADRESS' => strlen($arParams["ORDER_PROP_7"]) > 0 ? $arParams["ORDER_PROP_7"] : "Адрес не указан", 'DOSTAVKA' => getDeliveryName($arOrderDat["DELIVERY_ID"]), 'PRICE_METHOD' => $price_method, 'ORDERS' => $strOrderList . '<br />Итого: ' . $arOrderDat["ORDER_PRICE"], 'DISCOUNT' => $allDiscountItems . " руб.", 'COMMENT' => strlen($arParams["ORDER_DESCRIPTION"]) > 0 ? $arParams["ORDER_DESCRIPTION"] : "Нет комментария");
$eventName = "SALE_NEW_ORDER";
$eventNameManager = "FORM_FILLING_NEW_ORDER";
$bSend = true;
foreach (GetModuleEvents("sale", "OnOrderNewSendEmail", true) as $arEvent) {
if (ExecuteModuleEventEx($arEvent, array($arResult["ORDER_ID"], &$eventName, &$arFields)) === false) {
$bSend = false;
}
}
if ($bSend) {
$event = new CEvent();
$event->Send($eventName, SITE_ID, $arFieldsEvent, "N");
$event->Send($eventNameManager, SITE_ID, $arFieldsManager, "N");
}
return $ORDER_ID;
}
return false;
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:96,代码来源:functions.php
示例13: getOrder
class StatusTransacaoAkatus
{
const AGUARDANDO_PAGAMENTO = 'Aguardando Pagamento';
const EM_ANALISE = 'Em Análise';
const APROVADO = 'Aprovado';
const CANCELADO = 'Cancelado';
const DEVOLVIDO = 'Devolvido';
const COMPLETO = 'Completo';
const ESTORNADO = 'Estornado';
}
require_once 'app/Mage.php';
require_once 'app/code/core/Mage/Sales/Model/Order.php';
$codigoTransacao = $_POST["transacao_id"];
$statusAkatus = $_POST["status"];
$tokenRecebido = $_POST["token"];
$order = getOrder($codigoTransacao);
$tokenNIP = Mage::getStoreConfig('payment/akatus/tokennip', $order->getStoreId());
if ($tokenNIP == $tokenRecebido) {
$newOrderState = getNewOrderState($statusAkatus, $order);
Mage::Log('new order state: ' . $newOrderState);
if ($newOrderState) {
updateOrder($order, $newOrderState);
}
}
function getOrder($codigoTransacao)
{
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
Mage::app($mageRunCode, $mageRunType);
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
$retorno = $db->query("SELECT idpedido FROM akatus_transacoes WHERE codtransacao = '" . $codigoTransacao . "' ORDER BY id DESC");
开发者ID:lnoering,项目名称:Akatus-Magento,代码行数:31,代码来源:akatus_response.php
示例14: ValidateReorder
private function ValidateReorder()
{
if(empty($_REQUEST['orderid'])) {
flashMessage(getLang('InvalidOrderId'), MSG_ERROR, 'cart.php');
}
$customerId = getClass('ISC_CUSTOMER')->getCustomerId();
if(!$customerId) {
flashMessage(getLang('MustBeLoggedInToReorder'), MSG_ERROR, 'cart.php');
}
// Was this order placed by the same customer?
$order = getOrder($_REQUEST['orderid']);
if($order['ordcustid'] != $customerId) {
flashMessage(getLang('InvalidOrderId'), MSG_ERROR, 'cart.php');
}
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:17,代码来源:class.cart.php
示例15: SubscribeCustomerToLists
/**
* Subscribe a customer to newsletter and other lists based on their order
* if they have opted in to them
*
* @param array $orderRow An array that is ready to be passed to CreateOrder()
*
* @return void
*/
public function SubscribeCustomerToLists($orderid)
{
$orderRow = getOrder($orderid);
if ($orderRow === false) {
return;
}
// No point trying to subscribe them if we don't have an email to subscribe them with
if (trim($orderRow['ordbillemail']) == '') {
return;
}
// If the customer didn't opt in, stop immediately
if ($this->response->data['new-order-notification']['buyer-marketing-preferences']['email-allowed']['VALUE'] != 'true') {
return;
}
// Should we add them to our newsletter mailing list?
$this->SubscribeCustomerToNewsletter($orderRow['ordbillemail'], $orderRow['ordbillfirstname']);
// Should we add them to our special offers & discounts mailing list?
$this->SubscribeCustomerToOtherLists($orderRow);
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:32,代码来源:class.handler.php
示例16: connectDb
$sql = "INSERT INTO telerecord
VALUES ('{$teleNum}', '{$orderNum}', '{$orderState}')";
addOrder($sql);
}
$sql2 = "select * from telerecord where orderNum = '{$orderNum}'";
getOrder($sql2);
}
if($action == "updateOrder"){
if(!empty($teleNum) && (!empty($orderNum)) && (!empty($orderState))){
$sql = "UPDATE telerecord SET teleNum='{$teleNum}', orderState='{$orderState}'
WHERE orderNum='{$orderNum}'";
}
updateOrder($sql);
$sql2 = "select * from telerecord where orderNum = '{$orderNum}'";
getOrder($sql2);
}
$conn=null;
function connectDb(){
global $conn;
$servername = "localhost";
$username = "root";
$password = "root";
try {
$conn = new PDO("mysql:host=$servername;dbname=yjz", $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$conn->exec("SET CHARACTER SET UTF8");
} catch(PDOException $e)
开发者ID:uhgy,项目名称:phppractice,代码行数:31,代码来源:getTele.php
示例17: UpdateReturnStatus
public function UpdateReturnStatus(&$return, $status, $crediting = false)
{
// Start a transaction
$GLOBALS['ISC_CLASS_DB']->Query("START TRANSACTION");
// Changing the status of this return to "Refunded", so we need to perform some additional things
if($status == 5 && $return['retstatus'] != 5) {
$refundAmount = $return['retprodcost'] * $return['retprodqty'];
$updatedProduct = array(
"ordprodrefundamount" => $return['retprodcost'],
"ordprodrefunded" => $return['retprodqty'],
"ordprodreturnid" => $return['returnid']
);
$order = getOrder($return['retorderid']);
if (!$order) {
return false;
}
$GLOBALS['ISC_CLASS_DB']->UpdateQuery("order_products", $updatedProduct, "orderprodid='".$GLOBALS['ISC_CLASS_DB']->Quote($return['retordprodid'])."'");
$query = "
UPDATE [|PREFIX|]orders
SET ordrefundedamount = ordrefundedamount + ".$refundAmount."
WHERE orderid='".$return['retorderid']."'
";
$this->db->query($query);
// Have all items in this order been refunded? Mark the order as refunded.
$query = sprintf("SELECT SUM(ordprodqty-ordprodrefunded) FROM [|PREFIX|]order_products WHERE orderorderid=%d", $return['retorderid']);
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
$remainingItems = $GLOBALS['ISC_CLASS_DB']->FetchOne($result);
if($remainingItems == 0) {
$updatedOrder = array(
'ordstatus' => 4
);
$GLOBALS['ISC_CLASS_DB']->UpdateQuery("orders", $updatedOrder, "orderid='".$GLOBALS['ISC_CLASS_DB']->Quote($return['retorderid'])."'");
}
// Update the status of this return
$updatedReturn = array(
"retstatus" => 5,
"retuserid" => $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetUserId()
);
$GLOBALS['ISC_CLASS_DB']->UpdateQuery("returns", $updatedReturn, "returnid='".$GLOBALS['ISC_CLASS_DB']->Quote($return['returnid'])."'");
// Update the product inventory for this returned item
$query = sprintf("SELECT * FROM [|PREFIX|]order_products WHERE ordprodid='%d'", $return['retordprodid']);
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
$row = $GLOBALS['ISC_CLASS_DB']->Fetch($result);
UpdateInventoryOnReturn($return['retordprodid']);
// dont send a refund through the checkout module if a store credit was issued
if (!$crediting) {
// If the checkout module that was used for an order is still enabled and has a function
// to handle a status change, then call that function
$valid_checkout_modules = GetAvailableModules('checkout', true, true);
$valid_checkout_module_ids = array();
foreach ($valid_checkout_modules as $valid_module) {
$valid_checkout_module_ids[] = $valid_module['id'];
}
$newStatus = $order['ordstatus'];
if (isset($updatedOrder['ordstatus'])) {
$newStatus = $updatedOrder['ordstatus'];
}
// attempt to refund this amount with the checkout provider
$order = GetOrder($return['retorderid'], false);
if (in_array($order['orderpaymentmodule'], $valid_checkout_module_ids)) {
GetModuleById('checkout', $checkout_module, $order['orderpaymentmodule']);
if (method_exists($checkout_module, 'HandleStatusChange')) {
call_user_func(array($checkout_module, 'HandleStatusChange'), $return['retorderid'], $order['ordstatus'], $newStatus, $refundAmount);
}
}
}
}
else {
// Update the status of this return
$updatedReturn = array(
"retstatus" => $status
);
$GLOBALS['ISC_CLASS_DB']->UpdateQuery("returns", $updatedReturn, "returnid='".$GLOBALS['ISC_CLASS_DB']->Quote($return['returnid'])."'");
}
$return['retstatus'] = $status;
if(GetConfig('NotifyOnReturnStatusChange') == 1) {
$this->EmailReturnStatusChange($return);
}
if($GLOBALS['ISC_CLASS_DB']->GetErrorMsg() == "") {
$GLOBALS['ISC_CLASS_DB']->Query("COMMIT");
return true;
}
else {
return false;
}
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:class.returns.php
示例18: loadAlerts
function loadAlerts()
{
global $ThisUsername;
//gain access to the curent username
global $ThisUsers;
//gain access to the current user data
global $ThisSchools;
//gain access to the current school data
global $ThisGroups;
//gain access to the current group data
global $ThisOrders;
//gain access to the current order data
global $ThisProjects;
//gain access to the current project data
global $alertHtml;
//gain access to the alert html variable (end display html)
global $alertRemovedA;
//gain access to the array of removed alerts
global $alertA;
//gain access to the array of all alerts
getUser($ThisUsername);
//load the current user data based upon the user's username
getSchool($ThisUsers['School Code']);
//load the current school data for this user
getGroup($ThisUsers['Group Code']);
//load the current group data for this user
getOrder($ThisGroups['Order Code']);
//load the current order data for this group
getProject($ThisOrders['Doc Code']);
//load the current project data for this order
$userDBAlertsA = explode("&&&", $ThisUsers['Alerts']);
//split the user alert data string by &&& and store this array
if (count($userDBAlertsA) == 2) {
//if this array has two parts, (one &&& seperator)
$alertRemovedA = explode(",,,", $userDBAlertsA[0]);
//split the first part by ,,, and make these items the removed alerts (add the user removed alerts)
addAlerts($userDBAlertsA[1]);
//and process the other part using the addAlerts function (add the user alerts with respect to the removed alerts)
}
addAlerts($ThisSchools['Alerts']);
//add the school alerts with respect to the removed alerts
addAlerts($ThisGroups['Alerts']);
//add the group alerts with respect to the removed alerts
addAlerts($ThisOrders['Alerts']);
//add the order alerts with respect to the removed alerts
addAlerts($ThisProjects['Alerts']);
//add the project alerts with respect to the removed alerts
addAlerts("13,,,12,,,0,,,This is an alert! these can be sent to peeples' dashboards! They can be sent per group, school, individual, etc. ! This one should be blueish! Dale and Erik, you can make it look basicly however you want as long as it is stackable in this right pane!");
//example alert
addAlerts("23,,,22,,,1,,,Alerts basicly go away forever when you dismiss them.. these are just for testing.. This should be yellow-ish!");
//example alert
addAlerts("34,,,33,,,2,,,This one should be red-sih! WARNING! THE WORLD HAS ENDED!");
//example alert
$alertHtml = "";
//set the alert html to be blank
for ($i = 0; $i < count($alertA); $i++) {
//for each alert that is to be printed,
$thisAlertA = $alertA[$i];
//create a temporary variable to store the data for this alert
$alertHtml = $alertHtml . '<div class="alert-item-outer color-' . $thisAlertA[2] . '" id="alert-' . $thisAlertA[0] . '"><p align="left">' . $thisAlertA[3] . '</p><p align="right"><a style="color:#606060;" href="#" onclick="dismissAlert(' . "'" . $thisAlertA[0] . "'" . ');">Dismiss</a></p></div>';
//add this alert
}
if ($alertHtml == '') {
//if no alerts were added
$alertHtml = '<p style="margin-top:3em;color:#ffffff;font-size: 300%;">No new alerts at this time</p>';
//display the no new alerts text
}
}
开发者ID:radiotech,项目名称:BetaBox,代码行数:68,代码来源:misc.php
示例19: getColumn
if ($next && $_SESSION[$wr_key]['step'] == 5) {
$widget_id = $_SESSION[$wr_key]['widget_id'];
$widget_type = $_SESSION[$wr_key]['widget_type'];
$widget_asset =
|
请发表评论