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

PHP fn_get_order_info函数代码示例

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

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



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

示例1: fn_mve_place_order

function fn_mve_place_order(&$order_id, &$action, &$__order_status, &$cart)
{
    $order_info = fn_get_order_info($order_id);
    if ($order_info['is_parent_order'] != 'Y' && !empty($order_info['company_id'])) {
        // Check if the order already placed
        $payout_id = db_get_field('SELECT payout_id FROM ?:vendor_payouts WHERE order_id = ?i', $order_id);
        $company_data = fn_get_company_data($order_info['company_id']);
        $company_data['commission'] = $order_info['total'] > 0 ? $company_data['commission'] : 0;
        $company_data['commission_type'] = isset($company_data['commission_type']) ? $company_data['commission_type'] : '';
        $commission_amount = 0;
        if ($company_data['commission_type'] == 'P') {
            //Calculate commission amount and check if we need to include shipping cost
            $commission_amount = ($order_info['total'] - (Registry::get('settings.Vendors.include_shipping') == 'N' ? $order_info['shipping_cost'] : 0)) * $company_data['commission'] / 100;
        } else {
            $commission_amount = $company_data['commission'];
        }
        //Check if we need to take payment surcharge from vendor
        if (Registry::get('settings.Vendors.include_payment_surcharge') == 'Y') {
            $commission_amount += $order_info['payment_surcharge'];
        }
        $_data = array('company_id' => $order_info['company_id'], 'order_id' => $order_id, 'payout_date' => TIME, 'start_date' => TIME, 'end_date' => TIME, 'commission' => $company_data['commission'], 'commission_type' => $company_data['commission_type'], 'order_amount' => $order_info['total'], 'commission_amount' => $commission_amount);
        fn_set_hook('mve_place_order', $order_info, $company_data, $action, $__order_status, $cart, $_data);
        if ($commission_amount > $order_info['total']) {
            $commission_amount = $order_info['total'];
        }
        if (empty($payout_id)) {
            db_query('INSERT INTO ?:vendor_payouts ?e', $_data);
        } else {
            db_query('UPDATE ?:vendor_payouts SET ?u WHERE payout_id = ?i', $_data, $payout_id);
        }
    }
}
开发者ID:askzap,项目名称:ask-zap,代码行数:32,代码来源:fn.multivendor.php


示例2: updateBill

 function updateBill($param)
 {
     if (!is_object($param)) {
         return false;
     }
     $order_info = fn_get_order_info($param->txn, false, true, true, true);
     $temp = '';
     if (!empty($order_info['payment_method']['processor_params']['passwd']) && !empty($order_info['payment_method']['processor_params']['login'])) {
         $txn = fn_convert_encoding('utf-8', 'windows-1251', $param->txn);
         $password = fn_convert_encoding('utf-8', 'windows-1251', $order_info['payment_method']['processor_params']['passwd']);
         $crc = strtoupper(md5($txn . strtoupper(md5($password))));
         if ($param->login == $order_info['payment_method']['processor_params']['login'] && $param->password == $crc) {
             $pp_response = array();
             $status = 'qiwi_order_status_' . $param->status;
             if ($param->status == 60) {
                 $pp_response['order_status'] = 'P';
             } elseif ($param->status >= 50 && $param->status < 60) {
                 $pp_response['order_status'] = 'O';
             } else {
                 $pp_response['order_status'] = 'F';
             }
             $pp_response['reason_text'] = __($status);
             fn_finish_payment($param->txn, $pp_response);
             $temp = new Response();
             $temp->updateBillResult = 0;
         }
     }
     return $temp;
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:29,代码来源:qiwi.php


示例3: modePayment

function modePayment()
{
    $rid = $_REQUEST['order_id'];
    $orderId = $_SESSION['pw_order_id'];
    $iframe = '';
    $matchOrder = $rid == $orderId;
    $orderInfo = fn_get_order_info($orderId);
    if ($matchOrder && $orderInfo) {
        // Prepare Widget
        $iframe = fn_paymentwall_generateWidget($orderInfo, fn_paymentwall_getPaymentConfigs($orderInfo['payment_id']));
    }
    fn_add_breadcrumb('Paymentwall Payment', '#', true);
    Tygh::$app['view']->assign('params', array('matchOrder' => $matchOrder, 'orderId' => $orderId, 'baseUrl' => fn_url(), 'iframe' => $iframe));
}
开发者ID:vukhacdiep,项目名称:module-cscart,代码行数:14,代码来源:paymentwall.php


示例4: index

 public function index($id = 0, $params = array())
 {
     if (!empty($id)) {
         $data = fn_get_order_info($id, false, false);
         if (empty($data)) {
             $status = Response::STATUS_NOT_FOUND;
         } else {
             $status = Response::STATUS_OK;
         }
     } else {
         $items_per_page = $this->safeGet($params, 'items_per_page', Registry::get('settings.Appearance.admin_orders_per_page'));
         list($data, $params) = fn_get_orders($params, $items_per_page);
         $data = array('orders' => $data, 'params' => $params);
         $status = Response::STATUS_OK;
     }
     return array('status' => $status, 'data' => $data);
 }
开发者ID:askzap,项目名称:ultimate,代码行数:17,代码来源:Orders.php


示例5: update

 public function update($id, $params)
 {
     $data = array();
     $valid_params = true;
     $status = Response::STATUS_BAD_REQUEST;
     unset($params['shipment_id']);
     list($shipments, ) = fn_get_shipments_info(array('shipment_id' => $id));
     $shipment_data = reset($shipments);
     $order_info = fn_get_order_info($shipment_data['order_id'], false, true, true);
     if (Settings::instance()->getValue('use_shipments', '', $order_info['company_id']) == 'Y') {
         $data['message'] = __('api_shipments_not_allow_update');
         $valid_params = false;
     }
     if ($valid_params) {
         $shipment_id = fn_update_shipment($params, $id);
         if ($shipment_id) {
             $status = Response::STATUS_OK;
             $data = array('shipment_id' => $shipment_id);
         }
     }
     return array('status' => $status, 'data' => $data);
 }
开发者ID:askzap,项目名称:ultimate,代码行数:22,代码来源:Shipments.php


示例6: fn_sms_notifications_place_order

function fn_sms_notifications_place_order($order_id, $action, $fake1, $cart)
{
    if ($action !== 'save' && Registry::get('addons.sms_notifications.sms_new_order_placed') == 'Y') {
        Registry::get('view')->assign('order_id', $order_id);
        Registry::get('view')->assign('total', $cart['total']);
        $send_info = Registry::get('addons.sms_notifications.sms_send_payment_info');
        $send_email = Registry::get('addons.sms_notifications.sms_send_customer_email');
        $send_min_amount = Registry::get('addons.sms_notifications.sms_send_min_amout');
        $shippings = Registry::get('addons.sms_notifications.sms_send_shipping');
        if (!is_array($shippings)) {
            $shippings = array();
        }
        Registry::get('view')->assign('send_info', $send_info == 'Y' ? true : false);
        Registry::get('view')->assign('send_email', $send_email == 'Y' ? true : false);
        Registry::get('view')->assign('send_min_amount', $send_min_amount == 'Y' ? true : false);
        $order = fn_get_order_info($order_id);
        Registry::get('view')->assign('order_email', $order['email']);
        Registry::get('view')->assign('order_payment_info', $order['payment_method']['payment']);
        if (count($shippings)) {
            $in_shipping = false;
            if (!empty($order['shipping'])) {
                foreach ($order['shipping'] as $id => $data) {
                    if ($shippings[$id] == 'Y') {
                        $in_shipping = true;
                        break;
                    }
                }
            }
        } else {
            $in_shipping = true;
        }
        if ($in_shipping && $order['subtotal'] > doubleval($send_min_amount)) {
            $body = Registry::get('view')->display('addons/sms_notifications/views/sms/components/order_sms.tpl', false);
            fn_send_sms_notification($body);
        }
    }
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:37,代码来源:func.php


示例7: die

*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
use Tygh\Http;
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if (defined('PAYMENT_NOTIFICATION')) {
    if ($mode == 'frame' && !empty(Tygh::$app['session']['cmpi']['acs_url'])) {
        fn_create_payment_form(Tygh::$app['session']['cmpi']['acs_url'], Tygh::$app['session']['cmpi']['frame_data'], 'Card Issuer', false, 'post', false);
        exit;
    } elseif ($mode == 'bank' && !empty(Tygh::$app['session']['cmpi']['order_id'])) {
        $order_info = fn_get_order_info(Tygh::$app['session']['cmpi']['order_id']);
        $processor_data = fn_get_processor_data($order_info['payment_method']['payment_id']);
        $payment_name = str_replace('.php', '', $processor_data['processor_script']);
        Tygh::$app['session']['cmpi']['pares'] = !empty($_REQUEST['PaRes']) ? $_REQUEST['PaRes'] : '';
        $sess = Tygh::$app['session']->getName() . '=' . Tygh::$app['session']->getID();
        $src = fn_url("payment_notification.auth?payment={$payment_name}&{$sess}", AREA, 'current');
        $msg = __('text_cc_processor_connection', array('[processor]' => '3-D Secure server'));
        fn_create_payment_form($src, array(), '3-D Secure', false, 'get', false, 'parent');
        exit;
    } elseif ($mode == 'auth' && !empty(Tygh::$app['session']['cmpi']['order_id'])) {
        $view = Tygh::$app['view'];
        $view->assign('order_action', __('placing_order'));
        $view->display('views/orders/components/placing_order.tpl');
        fn_flush();
        fn_cmpi_authenticate();
        if (Tygh::$app['session']['cmpi']['signature'] == 'Y' && in_array(Tygh::$app['session']['cmpi']['pares'], array('Y', 'A', 'U'))) {
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:cmpi.php


示例8: fn_promotions_calculate_order_discount

/**
 * Calculate order discount for sub orders (used in MVE)
 *
 * @param string $type discount type
 * @param array $bonus Array with promotion data
 * @param int $bonus_id Bonus ID
 * @param array $cart Array with cart data
 * @return float calculated discount value
 */
function fn_promotions_calculate_order_discount($bonus, $bonus_id, $cart)
{
    $type = $bonus['discount_bonus'];
    $price = $cart['subtotal'];
    $value = $bonus['discount_value'];
    static $parent_orders = array();
    // this calculations are actual only for the fixed (absolute) amount
    if ($type == 'to_fixed' || $type == 'by_fixed') {
        // if it is parent or usual order
        if (empty($cart['parent_order_id'])) {
            // calculate usual discount
            $discount = fn_promotions_calculate_discount($type, $price, $value);
            // save order discount for future calculations of suborders
            $discount = fn_format_price($discount);
            $session_orders_discount =& $_SESSION['orders_discount'][$bonus['promotion_id'] . '_' . $bonus_id];
            $session_orders_discount['parent_order_discount'] = $discount;
            $session_orders_discount['suborders_discount'] = 0;
        } else {
            // this is sub order
            $parent_order_id = $cart['parent_order_id'];
            // get parent order subtotal info
            if (!isset($parent_orders[$parent_order_id]['subtotal'])) {
                $parent_order_info = fn_get_order_info($parent_order_id);
                $parent_orders[$parent_order_id]['subtotal'] = $parent_order_info['subtotal'];
            }
            if (!empty($parent_orders[$parent_order_id]['subtotal'])) {
                // calculate the share of the full discount
                $value = $value * $price / $parent_orders[$parent_order_id]['subtotal'];
            }
            $discount = fn_promotions_calculate_discount($type, $price, $value);
            $discount = fn_format_price($discount);
            $session_orders_discount =& $_SESSION['orders_discount'][$bonus['promotion_id'] . '_' . $bonus_id];
            $parent_order_discount = !empty($session_orders_discount['parent_order_discount']) ? $session_orders_discount['parent_order_discount'] : 0;
            $suborders_discount = !empty($session_orders_discount['suborders_discount']) ? $session_orders_discount['suborders_discount'] : 0;
            // check that total suborders discount is less than parent_order_discount
            // or this is last sub order, so we have to distract discount, to avoid the extra cents
            $new_suborders_discount = $suborders_discount + $discount;
            if ($new_suborders_discount > $parent_order_discount || !empty($cart['companies']) && end($cart['companies']) == $cart['company_id']) {
                $discount = $parent_order_discount - (!empty($session_orders_discount['suborders_discount']) ? $session_orders_discount['suborders_discount'] : 0);
                if ($discount < 0) {
                    $discount = 0;
                }
            }
            $session_orders_discount['suborders_discount'] = $suborders_discount + $discount;
        }
    } else {
        $discount = fn_promotions_calculate_discount($type, $price, $value);
    }
    return $discount;
}
开发者ID:askzap,项目名称:ultimate,代码行数:59,代码来源:fn.promotions.php


示例9: action

        190 - Payment success
        490 - Payment failure
        491 - Validation error
        492 - Technical error
        690 - Payment rejected
        790 - Waiting for user input
        791 - Waiting for processor
        792 - Waiting on consumer action (e.g.: initiate money transfer)
        793 - Payment on hold (e.g. waiting for sufficient balance)
        890 - Cancelled by consumer
        891 - Cancelled by merchant
*/
if (defined('PAYMENT_NOTIFICATION')) {
    if ($mode == 'notify') {
        $pp_response = array();
        $order_info = fn_get_order_info($_REQUEST['brq_invoicenumber']);
        $processor_data = fn_get_payment_method_data($order_info['payment_id']);
        $pp_response["transaction_id"] = $_REQUEST['brq_transactions'];
        $pp_response["reason_text"] = urldecode($_REQUEST['brq_statusmessage']);
        $_REQUEST['brq_websitekey'] = $processor_data['processor_params']['merchant_id'];
        $_signature = fn_buckaroo_calculate_signature($_REQUEST, $processor_data["processor_params"]["merchant_key"]);
        if (in_array($_REQUEST['brq_statuscode'], array('190')) && $_REQUEST['brq_signature'] == $_signature) {
            $pp_response['order_status'] = 'P';
        } elseif (in_array($_REQUEST['brq_statuscode'], array('791', '492'))) {
            $pp_response['order_status'] = 'O';
            // still waiting for the response
        } else {
            $pp_response['order_status'] = 'F';
        }
        fn_finish_payment($_REQUEST['brq_invoicenumber'], $pp_response, false);
        $route = $order_info['repaid'] ? 'repay' : 'route';
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:ideal_xml.php


示例10: die

****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
use Tygh\Http;
use Tygh\Registry;
use Tygh\Session;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if (defined('PAYMENT_NOTIFICATION')) {
    if ($mode == 'frame' && !empty($_SESSION['cmpi']['acs_url'])) {
        fn_create_payment_form($_SESSION['cmpi']['acs_url'], $_SESSION['cmpi']['frame_data'], 'Card Issuer', false, 'post', false);
        exit;
    } elseif ($mode == 'bank' && !empty($_SESSION['cmpi']['order_id'])) {
        $order_info = fn_get_order_info($_SESSION['cmpi']['order_id']);
        $processor_data = fn_get_processor_data($order_info['payment_method']['payment_id']);
        $payment_name = str_replace('.php', '', $processor_data['processor_script']);
        $_SESSION['cmpi']['pares'] = !empty($_REQUEST['PaRes']) ? $_REQUEST['PaRes'] : '';
        $sess = Session::getName() . '=' . Session::getId();
        $src = fn_url("payment_notification.auth?payment={$payment_name}&{$sess}", AREA, 'current');
        $msg = __('text_cc_processor_connection', array('[processor]' => '3-D Secure server'));
        fn_create_payment_form($src, array(), '3-D Secure', false, 'get', false, 'parent');
        exit;
    } elseif ($mode == 'auth' && !empty($_SESSION['cmpi']['order_id'])) {
        $view = Tygh::$app['view'];
        $view->assign('order_action', __('placing_order'));
        $view->display('views/orders/components/placing_order.tpl');
        fn_flush();
        fn_cmpi_authenticate();
        if ($_SESSION['cmpi']['signature'] == 'Y' && in_array($_SESSION['cmpi']['pares'], array('Y', 'A', 'U'))) {
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:cmpi.php


示例11: fn_print_order_packing_slips

function fn_print_order_packing_slips($order_ids, $pdf = false, $lang_code = CART_LANGUAGE)
{
    $view = Registry::get('view');
    $html = array();
    if (!is_array($order_ids)) {
        $order_ids = array($order_ids);
    }
    foreach ($order_ids as $order_id) {
        $order_info = fn_get_order_info($order_id, false, true, false, true);
        if (empty($order_info)) {
            continue;
        }
        $view->assign('order_info', $order_info);
        if ($pdf == true) {
            fn_disable_live_editor_mode();
            $html[] = $view->displayMail('orders/print_packing_slip.tpl', false, 'A', $order_info['company_id'], $lang_code);
        } else {
            $view->displayMail('orders/print_packing_slip.tpl', true, 'A', $order_info['company_id'], $lang_code);
        }
        if ($order_id != end($order_ids)) {
            echo "<div style='page-break-before: always;'>&nbsp;</div>";
        }
    }
    if ($pdf == true) {
        Pdf::render($html, __('packing_slip') . '-' . implode('-', $order_ids));
    }
    return true;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:28,代码来源:orders.php


示例12: header

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if ($mode == 'export_profiles') {
        header('Content-type: text/csv');
        header('Content-disposition: attachment; filename=shop-customers' . date('Ymd') . '.txt');
        foreach ($_REQUEST['user_ids'] as $k => $v) {
            $users[$k] = fn_get_user_info($v);
        }
        $view->assign('users', $users);
        $view->display('addons/myob/views/users/components/export_to_myob.tpl');
        exit;
    }
    if ($mode == 'export_orders') {
        header('Content-type: text/csv');
        header('Content-disposition: attachment; filename=shop-orders' . date('Ymd') . '.txt');
        foreach ($_REQUEST['order_ids'] as $k => $v) {
            $orders[$k] = fn_get_order_info($v);
            $orders[$k]['order_date'] = date('j/n/Y', $orders[$k]['timestamp']);
            $orders[$k]['paid_amount'] = 0;
            //TODO: Update this!
            foreach ($orders[$k]['items'] as $ik => $iv) {
                $option_desc = "";
                $desc_count = 0;
                if (!empty($orders[$k]['items'][$ik]['product_options'])) {
                    foreach ($orders[$k]['items'][$ik]['product_options'] as $option_key => $option_value) {
                        if ($desc_count > 0) {
                            $option_desc .= ", ";
                        } else {
                            $option_desc = ' (';
                        }
                        $option_desc .= $option_value['option_name'] . ' = ' . $option_value['variant_name'];
                        $desc_count++;
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:myob_export.php


示例13: die

* license  and  accept  to the terms of the  License Agreement can install *
* and use this program.                                                    *
*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
use Tygh\Registry;
use Tygh\Http;
use Tygh\Shippings\RusSdek;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $params = $_REQUEST;
    $order_info = fn_get_order_info($params['order_id'], false, true, true, true);
    if ($mode == 'sdek_order_delivery') {
        if (empty($params['add_sdek_info'])) {
            return false;
        }
        foreach ($params['add_sdek_info'] as $shipment_id => $sdek_info) {
            list($_shipments, $search) = fn_get_shipments_info(array('order_id' => $params['order_id'], 'advanced_info' => true, 'shipment_id' => $shipment_id));
            $shipment = reset($_shipments);
            $params_shipping = array('shipping_id' => $shipment['shipping_id'], 'Date' => date("Y-m-d", $shipment['shipment_timestamp']));
            $data_auth = RusSdek::dataAuth($params_shipping);
            if (empty($data_auth)) {
                continue;
            }
            $order_for_sdek = $sdek_info['Order'];
            $lastname = "";
            if (!empty($order_info['lastname'])) {
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:orders.post.php


示例14: fn_exim_1c_export_orders

function fn_exim_1c_export_orders($company_id, $lang_code)
{
    $cml = fn_get_cml_tag_names();
    $params = array('company_name' => true, 'place' => 'exim_1c', 'company_id' => $company_id);
    $statuses = Registry::get('addons.rus_exim_1c.exim_1c_order_statuses');
    if (!empty($statuses)) {
        foreach ($statuses as $key => $status) {
            if (!empty($status)) {
                $params['status'][] = $key;
            }
        }
    }
    list($orders, $search) = fn_get_orders($params);
    header("Content-type: text/xml; charset=utf-8");
    fn_echo("");
    $xml = new XMLWriter();
    $xml->openMemory();
    $xml->startDocument();
    $xml->startElement($cml['commerce_information']);
    foreach ($orders as $k => $data) {
        $order_data = fn_get_order_info($data['order_id']);
        $xml = fn_exim_1c_echo_order_xml($xml, $order_data, $lang_code);
    }
    $xml->endElement();
    fn_echo($xml->outputMemory());
}
开发者ID:askzap,项目名称:ask-zap,代码行数:26,代码来源:func.php


示例15: fn_get_packing_info

function fn_get_packing_info($shipment_id)
{
    $params['advanced_info'] = true;
    $params['shipment_id'] = $shipment_id;
    list($shipment, $search, $total) = fn_get_shipments_info($params);
    if (!empty($shipment)) {
        $shipment = array_pop($shipment);
        $order_info = fn_get_order_info($shipment['order_id'], false, true, true);
        $shippings = db_get_array("SELECT a.shipping_id, a.min_weight, a.max_weight, a.position, a.status, b.shipping, b.delivery_time, a.usergroup_ids FROM ?:shippings as a LEFT JOIN ?:shipping_descriptions as b ON a.shipping_id = b.shipping_id AND b.lang_code = ?s ORDER BY a.position", DESCR_SL);
        $_products = db_get_array("SELECT item_id, SUM(amount) AS amount FROM ?:shipment_items WHERE order_id = ?i GROUP BY item_id", $shipment['order_id']);
        $shipped_products = array();
        if (!empty($_products)) {
            foreach ($_products as $_product) {
                $shipped_products[$_product['item_id']] = $_product['amount'];
            }
        }
        foreach ($order_info['items'] as $k => $oi) {
            if (isset($shipped_products[$k])) {
                $order_info['items'][$k]['shipment_amount'] = $oi['amount'] - $shipped_products[$k];
            } else {
                $order_info['items'][$k]['shipment_amount'] = $order_info['items'][$k]['amount'];
            }
            if (isset($shipment['items'][$k])) {
                $order_info['items'][$k]['amount'] = $shipment['items'][$k];
            } else {
                $order_info['items'][$k]['amount'] = 0;
            }
        }
    } else {
        $shipment = $order_info = array();
    }
    return array($shipment, $order_info);
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:33,代码来源:shipments.php


示例16: fn_update_order_customer_info

function fn_update_order_customer_info($data, $order_id)
{
    $order_info = fn_get_order_info($order_id);
    $new_order_info = array();
    $need_update = false;
    if (empty($order_info)) {
        return false;
    }
    foreach ($data as $k => $v) {
        if ($data[$k] != $order_info[$k]) {
            $need_update = true;
            $new_order_info[$k] = $v;
        }
    }
    if ($need_update) {
        db_query("UPDATE ?:orders SET ?u WHERE order_id = ?i", $new_order_info, $order_id);
    }
    return true;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:19,代码来源:fn.cart.php


示例17: fn_reorder

function fn_reorder($order_id, &$cart, &$auth)
{
    $order_info = fn_get_order_info($order_id, false, false, false, true);
    unset($_SESSION['shipping_hash']);
    unset($_SESSION['edit_step']);
    fn_set_hook('reorder', $order_info, $cart, $auth);
    foreach ($order_info['products'] as $k => $item) {
        // refresh company id
        $company_id = db_get_field("SELECT company_id FROM ?:products WHERE product_id = ?i", $item['product_id']);
        $order_info['products'][$k]['company_id'] = $company_id;
        unset($order_info['products'][$k]['extra']['ekey_info']);
        $order_info['products'][$k]['product_options'] = empty($order_info['products'][$k]['extra']['product_options']) ? array() : $order_info['products'][$k]['extra']['product_options'];
        $order_info['products'][$k]['main_pair'] = fn_get_cart_product_icon($item['product_id'], $order_info['products'][$k]);
    }
    if (!empty($cart) && !empty($cart['products'])) {
        $cart['products'] = fn_array_merge($cart['products'], $order_info['products']);
    } else {
        $cart['products'] = $order_info['products'];
    }
    foreach ($cart['products'] as $k => $v) {
        $_is_edp = db_get_field("SELECT is_edp FROM ?:products WHERE product_id = ?i", $v['product_id']);
        if ($amount = fn_check_amount_in_stock($v['product_id'], $v['amount'], $v['product_options'], $k, $_is_edp, 0, $cart)) {
            $cart['products'][$k]['amount'] = $amount;
            // Change the path of custom files
            if (!empty($v['extra']['custom_files'])) {
                foreach ($v['extra']['custom_files'] as $option_id => $_data) {
                    if (!empty($_data)) {
                        foreach ($_data as $file_id => $file) {
                            $cart['products'][$k]['extra']['custom_files'][$option_id][$file_id]['path'] = 'sess_data/' . fn_basename($file['path']);
                        }
                    }
                }
            }
        } else {
            unset($cart['products'][$k]);
        }
    }
    // Restore custom files for editing
    $dir_path = 'order_data/' . $order_id;
    if (Storage::instance('custom_files')->isExist($dir_path)) {
        Storage::instance('custom_files')->copy($dir_path, 'sess_data');
    }
    // Redirect customer to step three after reordering
    $cart['payment_updated'] = true;
    fn_save_cart_content($cart, $auth['user_id']);
    unset($cart['product_groups']);
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:47,代码来源:orders.php


示例18: die

/**
 * @author Albert Peschar <[email protected]>
 */
use Tygh\Http;
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
$redirect_timeout = "\n    <script>\n    window.setTimeout(function() {\n        window.location = " . json_encode(fn_url('checkout.checkout')) . ";\n    }, 5000);\n    </script>\n    <p>You will be redirected in 5 seconds.</p>\n";
if (defined('PAYMENT_NOTIFICATION')) {
    if (!isset($_GET['order_id'])) {
        echo "<p>Order ID not specified.</p>", $redirect_timeout;
        exit;
    }
    $order_info = fn_get_order_info($_GET['order_id']);
    if (!$order_info) {
        echo "<p>Order not found.</p>", $redirect_timeout;
        exit;
    }
    $order_id = $order_info['order_id'];
    $processor_data = fn_get_payment_method_data($order_info['payment_id']);
    if (!$processor_data) {
        echo "<p>Payment method not found.</p>", $redirect_timeout;
        exit;
    }
    if (!isset($_GET['litepaid_id'])) {
        echo "<p>LitePaid ID not specified.</p>", $redirect_timeout;
        exit;
    }
    $litepaid_id = $_GET['litepaid_id'];
开发者ID:apeschar,项目名称:litepaid-cscart,代码行数:30,代码来源:litepaid.php


示例19: fn_create_return_gift_certificate

function fn_create_return_gift_certificate($order_id, $amount)
{
    $min = Registry::get('addons.gift_certificates.min_amount') * 1;
    $max = Registry::get('addons.gift_certificates.max_amount') * 1;
    $order_info = fn_get_order_info($order_id);
    $templates = fn_get_gift_certificate_templates();
    $_data = array('send_via' => 'E', 'recipient' => "{$order_info['firstname']} {$order_info['lastname']}", 'sender' => Registry::get('settings.Company.company_name'), 'amount' => $amount, 'email' => $order_info['email'], 'address' => $order_info['s_address'], 'address_2' => $order_info['s_address_2'], 'city' => $order_info['s_city'], 'country' => $order_info['s_country'], 'state' => $order_info['s_state'], 'zipcode' => $order_info['s_zipcode'], 'phone' => $order_info['phone'], 'template' => key($templates));
    if (fn_allowed_for('ULTIMATE')) {
        $_data['company_id'] = Registry::ifGet('runtime.company_id', $order_info['company_id']);
    }
    do {
        $code = fn_generate_gift_certificate_code();
    } while (true == fn_check_gift_certificate_code($code));
    if ($amount < $min || $amount > $max) {
        fn_set_notification('E', __('error'), __('gift_cert_error_amount', array('[min]' => $min, '[max]' => $max)));
        $result = array();
    } else {
        $_data = fn_array_merge($_data, array('gift_cert_code' => $code, 'timestamp' => TIME));
        $gift_cert_id = db_query('INSERT INTO ?:gift_certificates ?e', $_data);
        $result = array($gift_cert_id => array('code' => $code, 'amount' => $amount));
    }
    return $result;
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:23,代码来源:func.php


示例20: fn_get_order_info

    if ($mode == 'cancel') {
        $order_info = fn_get_order_info($_REQUEST['order_id']);
        fn_pp_save_mode($order_info);
        if ($order_info['status'] == 'O' || $order_info['status'] == 'I') {
            $pp_response['order_status'] = 'I';
            $pp_response["reason_text"] = __('text_transaction_cancelled');
            fn_finish_payment($order_info['order_id'], $pp_response);
        }
        fn_order_placement_routines('route', $_REQUEST['order_id'], false);
    } else {
        $order_id = !empty($_REQUEST['order_id']) ? $_REQUEST['order_id'] : 0;
        $token = !empty($_REQUEST['token']) ? $_REQUEST['token'] : 0;
        $payment_id = db_get_field("SELECT payment_id FROM ?:orders WHERE order_id = ?i", $order_id);
        $processor_data = fn_get_payment_method_data($payment_id);
        $processor_data['processor_script'] = 'paypal_express.php';
        $order_info = fn_get_order_info($order_id);
        fn_pp_save_mode($order_info);
        fn_paypal_complete_checkout($token, $processor_data, $order_info);
    }
}
$mode = !empty($mode) ? $mode : (!empty($_REQUEST['mode']) ? $_REQUEST['mode'] : '');
if ($mode == 'express_return') {
    $token = $_REQUEST['token'];
    $payment_id = $_REQUEST['payment_id'];
    $processor_data = fn_get_payment_method_data($payment_id);
    $paypal_checkout_details = fn_paypal_get_express_checkout_details($processor_data, $token);
    if (fn_paypal_ack_success($paypal_checkout_details)) {
        fn_paypal_user_login($paypal_checkout_details);
        $paypal_express_details = array('token' => $token, 'payment_id' => $payment_id);
        $_SESSION['pp_express_details'] = $paypal_express_details;
        $_SESSION['cart']['payment_id'] = $payment_id;
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:paypal_express.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP fn_get_page_data函数代码示例发布时间:2022-05-15
下一篇:
PHP fn_get_notification_rules函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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