function output() { if (modApiFunc('Checkout', 'getCurrentStepID') == 4) { return getCheckout(); } if (modApiFunc('Session', 'is_Set', '_lastPlacedOrderID')) { return getOrderInfo(modApiFunc('Session', 'get', '_lastPlacedOrderID')); } global $application; $request = new Request(); $request->setView('Checkout'); $application->redirect($request); }
function updateMail($newstatus, $idorder) { global $modx, $tsvshop, $shop_lang; $body = getTpl($tsvshop['tplmailupdateorder']); $row = getOrderInfo($idorder); $i = 0; $body = str_replace("[+shop.order.status+]", $newstatus, $body); if (!empty($row)) { foreach ($row as $key => $val) { if (in_array($key, explode(",", $tsvshop['SecFields']))) { $val = DeCryptMessage($val, $tsvshop['SecPassword']); } if ($key == "dateorder") { $body = str_replace("[+shop.order." . $key . "+]", date("d.m.Y H:i:s", $val), $body); } else { $body = str_replace("[+shop.order." . $key . "+]", $val, $body); } $body = str_replace("[+shop.order.num+]", $i, $body); $i++; } } $body = str_replace("[+shop.order.sitename+]", $modx->config['site_name'], $body); if ($row['status'] != $newstatus) { if (sendMailUpdate(DeCryptMessage($row['email'], $tsvshop['SecPassword']), $tsvshop['SubjectUpdateStatus'], $body, 'true')) { return true; } else { return false; } } }
<?php /* * An order confirmation screen for the buyer. The buyer * is required to choose a payment method here. * Available payment methods are paypal and credit card. */ require_once __DIR__ . '/../bootstrap.php'; session_start(); //set amount for lisence if (!isOrdered()) { header('Location: ../index.php'); exit; } $orderInfo = getOrderInfo(); $amount = 0; $description = ""; $prices = getPriceById($orderInfo['price_id']); $keyData = array(); if (!$prices) { $errorMessage = "Processing error! License type not found"; $messageType = "error"; } else { try { if (isset($orderInfo["key"])) { $keyData = getKeyById($orderInfo["key"]); if (!$keyData) { throw new Exception("Key not exits", 1); } } } catch (Exception $e) {
<?php session_start(); include_once 'flaberryorder.class.php'; if (isset($_POST['action'])) { $action = $_POST['action']; if ($action === 'order_to_price_challan') { getOrderInfo(); } } function getOrderInfo() { $orderObj = new Flaberryorder(); $orderObj->loadOrder($_POST['order_id']); $barcode_image = $orderObj->getOrderBarCode(); $barcode_height = $orderObj->getBarcodeImageHeight(); $barcode_width = $orderObj->getBarcodeImageWidth(); $final_data = array(); $final_data['shipping_add'] = trim($orderObj->getShippingAddressData()); $final_data['billing_add'] = trim($orderObj->getBillingAddressData()); $final_data['shipping_phone'] = $orderObj->getShippingPhoneNo(); $final_data['billing_phone'] = $orderObj->getBillingPhoneNo(); $final_data['subtotal_amount'] = $orderObj->getOrderGrandTotal(); $final_data['delivery_type'] = $orderObj->getOrderDeliveryType(); $final_data['date_of_delivery'] = $orderObj->getOrderDeliveryDate(); $final_data['special_instruction'] = $orderObj->getOrderCustomerInstruction(); $final_data['loggedinuser'] = '******'; //$_SESSION['logged_in_auth_user_name']; $final_data['barcode_image'] = $barcode_image; $final_data['barcode_height'] = $barcode_height; $final_data['barcode_width'] = $barcode_width;
function detailsBooking($id) { $book = getOrderInfo($id); return $book; }